Package @pulumi/kubernetesx
var kubernetesx = require("@pulumi/kubernetesx");
import * as kubernetesx from "@pulumi/kubernetesx";
namespace types
- Container
- Deployment
- DeploymentSpec
- EnvMap
- Job
- JobSpec
- Pod
- PodBuilderDeploymentSpec
- PodBuilderJobSpec
- PodSpec
- PortMap
- Service
- ServiceSpec
- ServiceType
- StatefulSet
- StatefulSetSpec
- VolumeMount
Resources
Others
namespace types
type Container
type Container = Omit<Container, "env" | "name" | "ports" | "volumeMounts"> & {
env?: pulumi.Input<pulumi.Input<EnvVar>[] | EnvMap>;
name?: pulumi.Input<string>;
ports?: pulumi.Input<pulumi.Input<ContainerPort>[] | PortMap>;
volumeMounts?: pulumi.Input<pulumi.Input<VolumeMount | VolumeMount>[]>;
};
type Deployment
type Deployment = Omit<Deployment, "spec"> & {
spec: pulumi.Input<DeploymentSpec | DeploymentSpec>;
};
type DeploymentSpec
type DeploymentSpec = Omit<DeploymentSpec, "template"> & {
template: pulumi.Input<Pod>;
};
type EnvMap
type EnvMap = Record<string, pulumi.Input<string | EnvVarSource>>;
type Job
type Job = Omit<Job, "spec"> & {
spec: pulumi.Input<JobSpec | JobSpec>;
};
type JobSpec
type JobSpec = Omit<JobSpec, "template"> & {
template: pulumi.Input<Pod>;
};
type Pod
type Pod = Omit<Pod, "spec"> & {
spec: pulumi.Input<PodSpec | PodBuilder>;
};
type PodBuilderDeploymentSpec
type PodBuilderDeploymentSpec = Omit<DeploymentSpec, "selector" | "template">;
type PodBuilderJobSpec
type PodBuilderJobSpec = Omit<JobSpec, "template">;
type PodSpec
type PodSpec = Omit<PodSpec, "containers"> & {
containers: pulumi.Input<pulumi.Input<Container>[]>;
};
type PortMap
type PortMap = Record<string, pulumi.Input<number>>;
type Service
type Service = Omit<Service, "spec"> & {
spec: pulumi.Input<ServiceSpec>;
};
type ServiceSpec
type ServiceSpec = Omit<ServiceSpec, "ports" | "type"> & {
ports?: pulumi.Input<pulumi.Input<ServicePort>[] | PortMap>;
type?: pulumi.Input<ServiceType | string>;
};
enum ServiceType
enum member ClusterIP
enum member LoadBalancer
type StatefulSet
type StatefulSet = Omit<StatefulSet, "spec"> & {
spec: pulumi.Input<StatefulSetSpec | StatefulSetSpec>;
};
type StatefulSetSpec
type StatefulSetSpec = Omit<StatefulSetSpec, "template"> & {
template: pulumi.Input<Pod>;
};
type VolumeMount
type VolumeMount = {
destPath: pulumi.Input<string>;
srcPath?: pulumi.Input<string>;
volume: pulumi.Input<Volume>;
};
Resources
Resource StatefulSet
class StatefulSet extends ComponentResource
constructor
new StatefulSet(name: string, args: types.StatefulSet, opts?: pulumi.CustomResourceOptions)
method getData
protected getData(): Promise<TData>
Retrieves the data produces by [initialize]. The data is immediately available in a
derived class’s constructor after the super(...)
call to ComponentResource
.
method getProvider
getProvider(moduleMember: string): ProviderResource | undefined
method initialize
protected initialize(args: Inputs): Promise<TData>
Can be overridden by a subclass to asynchronously initialize data for this Component
automatically when constructed. The data will be available immediately for subclass
constructors to use. To access the data use .getData
.
method isInstance
static isInstance(obj: any): obj is ComponentResource
Returns true if the given object is an instance of CustomResource. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.
method registerOutputs
protected registerOutputs(outputs?: Inputs | Promise<Inputs> | Output<Inputs>): void
registerOutputs registers synthetic outputs that a component has initialized, usually by allocating other child sub-resources and propagating their resulting property values.
ComponentResources can call this at the end of their constructor to indicate that they are
done creating child resources. This is not strictly necessary as this will automatically be
called after the initialize
method completes.
property urn
urn: Output<URN>;
urn is the stable logical URN used to distinctly address a resource, both before and after deployments.
Others
class ConfigMap
class ConfigMap extends ConfigMap
constructor
new ConfigMap(name: string, args: ConfigMap, opts?: pulumi.CustomResourceOptions)
method asEnvValue
public asEnvValue(key: pulumi.Input<string>): pulumi.Output<EnvVarSource>
method get
static get(name: string, id: pulumi.Input<pulumi.ID>, opts?: pulumi.CustomResourceOptions): ConfigMap
Get the state of an existing ConfigMap
resource, as identified by id
.
The ID is of the form [namespace]/<name>
; if namespace
is omitted, then (per
Kubernetes convention) the ID becomes default/<name>
.
Pulumi will keep track of this resource using name
as the Pulumi ID.
method getProvider
getProvider(moduleMember: string): ProviderResource | undefined
method isInstance
static isInstance(obj: any): obj is ConfigMap
Returns true if the given object is an instance of ConfigMap. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.
method mount
public mount(destPath: pulumi.Input<string>, srcPath?: pulumi.Input<string>): pulumi.Output<types.VolumeMount>
property apiVersion
apiVersion: pulumi.Output<"v1">;
APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
property binaryData
binaryData: pulumi.Output<object>;
BinaryData contains the binary data. Each key must consist of alphanumeric characters, ‘-’, ‘_’ or ‘.’. BinaryData can contain byte sequences that are not in the UTF-8 range. The keys stored in BinaryData must not overlap with the ones in the Data field, this is enforced during validation process. Using this field will require 1.10+ apiserver and kubelet.
property data
data: pulumi.Output<{[key: string]: pulumi.Output<string>}>;
Data contains the configuration data. Each key must consist of alphanumeric characters, ‘-’, ‘_’ or ‘.’. Values with non-UTF-8 byte sequences must use the BinaryData field. The keys stored in Data must not overlap with the keys in the BinaryData field, this is enforced during validation process.
property id
id: Output<ID>;
id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.
property immutable
immutable: pulumi.Output<boolean>;
Immutable, if set to true, ensures that data stored in the ConfigMap cannot be updated (only object metadata can be modified). If not set to true, the field can be modified at any time. Defaulted to nil. This is an alpha field enabled by ImmutableEphemeralVolumes feature gate.
property kind
kind: pulumi.Output<"ConfigMap">;
Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
property metadata
metadata: pulumi.Output<ObjectMeta>;
Standard object’s metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
property urn
urn: Output<URN>;
urn is the stable logical URN used to distinctly address a resource, both before and after deployments.
class Deployment
class Deployment extends Deployment
constructor
new Deployment(name: string, args: types.Deployment, opts?: pulumi.CustomResourceOptions)
method createService
public createService(args: types.ServiceSpec): Service
method get
static get(name: string, id: pulumi.Input<pulumi.ID>, opts?: pulumi.CustomResourceOptions): Deployment
Get the state of an existing Deployment
resource, as identified by id
.
The ID is of the form [namespace]/<name>
; if namespace
is omitted, then (per
Kubernetes convention) the ID becomes default/<name>
.
Pulumi will keep track of this resource using name
as the Pulumi ID.
method getProvider
getProvider(moduleMember: string): ProviderResource | undefined
method isInstance
static isInstance(obj: any): obj is Deployment
Returns true if the given object is an instance of Deployment. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.
property apiVersion
apiVersion: pulumi.Output<"apps/v1">;
APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
property id
id: Output<ID>;
id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.
property kind
kind: pulumi.Output<"Deployment">;
Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
property metadata
metadata: pulumi.Output<ObjectMeta>;
Standard object metadata.
property spec
spec: pulumi.Output<DeploymentSpec>;
Specification of the desired behavior of the Deployment.
property status
status: pulumi.Output<DeploymentStatus>;
Most recently observed status of the Deployment.
property urn
urn: Output<URN>;
urn is the stable logical URN used to distinctly address a resource, both before and after deployments.
class Job
class Job extends Job
constructor
new Job(name: string, args: types.Job, opts?: pulumi.CustomResourceOptions)
method get
static get(name: string, id: pulumi.Input<pulumi.ID>, opts?: pulumi.CustomResourceOptions): Job
Get the state of an existing Job
resource, as identified by id
.
The ID is of the form [namespace]/<name>
; if namespace
is omitted, then (per
Kubernetes convention) the ID becomes default/<name>
.
Pulumi will keep track of this resource using name
as the Pulumi ID.
method getProvider
getProvider(moduleMember: string): ProviderResource | undefined
method isInstance
static isInstance(obj: any): obj is Job
Returns true if the given object is an instance of Job. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.
property apiVersion
apiVersion: pulumi.Output<"batch/v1">;
APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
property id
id: Output<ID>;
id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.
property kind
kind: pulumi.Output<"Job">;
Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
property metadata
metadata: pulumi.Output<ObjectMeta>;
Standard object’s metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
property spec
spec: pulumi.Output<JobSpec>;
Specification of the desired behavior of a job. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
property status
status: pulumi.Output<JobStatus>;
Current status of a job. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
property urn
urn: Output<URN>;
urn is the stable logical URN used to distinctly address a resource, both before and after deployments.
class PersistentVolumeClaim
class PersistentVolumeClaim extends PersistentVolumeClaim
constructor
new PersistentVolumeClaim(name: string, args: PersistentVolumeClaim, opts?: pulumi.CustomResourceOptions)
method get
static get(name: string, id: pulumi.Input<pulumi.ID>, opts?: pulumi.CustomResourceOptions): PersistentVolumeClaim
Get the state of an existing PersistentVolumeClaim
resource, as identified by id
.
The ID is of the form [namespace]/<name>
; if namespace
is omitted, then (per
Kubernetes convention) the ID becomes default/<name>
.
Pulumi will keep track of this resource using name
as the Pulumi ID.
method getProvider
getProvider(moduleMember: string): ProviderResource | undefined
method isInstance
static isInstance(obj: any): obj is PersistentVolumeClaim
Returns true if the given object is an instance of PersistentVolumeClaim. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.
method mount
public mount(destPath: pulumi.Input<string>, srcPath?: pulumi.Input<string>): pulumi.Output<types.VolumeMount>
property apiVersion
apiVersion: pulumi.Output<"v1">;
APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
property id
id: Output<ID>;
id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.
property kind
kind: pulumi.Output<"PersistentVolumeClaim">;
Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
property metadata
metadata: pulumi.Output<ObjectMeta>;
Standard object’s metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
property spec
spec: pulumi.Output<PersistentVolumeClaimSpec>;
Spec defines the desired characteristics of a volume requested by a pod author. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims
property status
status: pulumi.Output<PersistentVolumeClaimStatus>;
Status represents the current information/status of a persistent volume claim. Read-only. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims
property urn
urn: Output<URN>;
urn is the stable logical URN used to distinctly address a resource, both before and after deployments.
class Pod
class Pod extends Pod
constructor
new Pod(name: string, args: types.Pod, opts?: pulumi.CustomResourceOptions)
method get
static get(name: string, id: pulumi.Input<pulumi.ID>, opts?: pulumi.CustomResourceOptions): Pod
Get the state of an existing Pod
resource, as identified by id
.
The ID is of the form [namespace]/<name>
; if namespace
is omitted, then (per
Kubernetes convention) the ID becomes default/<name>
.
Pulumi will keep track of this resource using name
as the Pulumi ID.
method getProvider
getProvider(moduleMember: string): ProviderResource | undefined
method isInstance
static isInstance(obj: any): obj is Pod
Returns true if the given object is an instance of Pod. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.
property apiVersion
apiVersion: pulumi.Output<"v1">;
APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
property id
id: Output<ID>;
id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.
property kind
kind: pulumi.Output<"Pod">;
Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
property metadata
metadata: pulumi.Output<ObjectMeta>;
Standard object’s metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
property spec
spec: pulumi.Output<PodSpec>;
Specification of the desired behavior of the pod. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
property status
status: pulumi.Output<PodStatus>;
Most recently observed status of the pod. This data may not be up to date. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
property urn
urn: Output<URN>;
urn is the stable logical URN used to distinctly address a resource, both before and after deployments.
class PodBuilder
class PodBuilder
constructor
new PodBuilder(args: types.PodSpec)
method asDeploymentSpec
public asDeploymentSpec(args?: types.PodBuilderDeploymentSpec): pulumi.Output<DeploymentSpec>
method asJobSpec
public asJobSpec(args?: types.PodBuilderJobSpec): pulumi.Output<JobSpec>
method asStatefulSetSpec
public asStatefulSetSpec(args?: undefined | {
replicas?: undefined | number;
}): pulumi.Output<StatefulSetSpec>
property podSpec
public podSpec: pulumi.Output<PodSpec>;
class Secret
class Secret extends Secret
constructor
new Secret(name: string, args: Secret, opts?: pulumi.CustomResourceOptions)
method asEnvValue
public asEnvValue(key: pulumi.Input<string>): pulumi.Output<EnvVarSource>
method get
static get(name: string, id: pulumi.Input<pulumi.ID>, opts?: pulumi.CustomResourceOptions): Secret
Get the state of an existing Secret
resource, as identified by id
.
The ID is of the form [namespace]/<name>
; if namespace
is omitted, then (per
Kubernetes convention) the ID becomes default/<name>
.
Pulumi will keep track of this resource using name
as the Pulumi ID.
method getProvider
getProvider(moduleMember: string): ProviderResource | undefined
method isInstance
static isInstance(obj: any): obj is Secret
Returns true if the given object is an instance of Secret. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.
method mount
public mount(destPath: pulumi.Input<string>, srcPath?: pulumi.Input<string>): pulumi.Output<types.VolumeMount>
property apiVersion
apiVersion: pulumi.Output<"v1">;
APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
property data
data: pulumi.Output<object>;
Data contains the secret data. Each key must consist of alphanumeric characters, ‘-’, ‘_’ or ‘.’. The serialized form of the secret data is a base64 encoded string, representing the arbitrary (possibly non-string) data value here. Described in https://tools.ietf.org/html/rfc4648#section-4
property id
id: Output<ID>;
id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.
property immutable
immutable: pulumi.Output<boolean>;
Immutable, if set to true, ensures that data stored in the Secret cannot be updated (only object metadata can be modified). If not set to true, the field can be modified at any time. Defaulted to nil. This is an alpha field enabled by ImmutableEphemeralVolumes feature gate.
property kind
kind: pulumi.Output<"Secret">;
Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
property metadata
metadata: pulumi.Output<ObjectMeta>;
Standard object’s metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
property stringData
stringData: pulumi.Output<{[key: string]: pulumi.Output<string>}>;
stringData allows specifying non-binary secret data in string form. It is provided as a write-only convenience method. All keys and values are merged into the data field on write, overwriting any existing values. It is never output when reading from the API.
property type
type: pulumi.Output<string>;
Used to facilitate programmatic handling of secret data.
property urn
urn: Output<URN>;
urn is the stable logical URN used to distinctly address a resource, both before and after deployments.
class Service
class Service extends Service
constructor
new Service(name: string, args: types.Service, opts?: pulumi.CustomResourceOptions)
method get
static get(name: string, id: pulumi.Input<pulumi.ID>, opts?: pulumi.CustomResourceOptions): Service
Get the state of an existing Service
resource, as identified by id
.
The ID is of the form [namespace]/<name>
; if namespace
is omitted, then (per
Kubernetes convention) the ID becomes default/<name>
.
Pulumi will keep track of this resource using name
as the Pulumi ID.
method getProvider
getProvider(moduleMember: string): ProviderResource | undefined
method isInstance
static isInstance(obj: any): obj is Service
Returns true if the given object is an instance of Service. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.
property apiVersion
apiVersion: pulumi.Output<"v1">;
APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
property endpoint
public endpoint: pulumi.Output<string>;
Endpoint of the Service. This can be either an IP address or a hostname, depending on the k8s cluster provider.
property id
id: Output<ID>;
id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.
property kind
kind: pulumi.Output<"Service">;
Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
property metadata
metadata: pulumi.Output<ObjectMeta>;
Standard object’s metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
property spec
spec: pulumi.Output<ServiceSpec>;
Spec defines the behavior of a service. https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
property status
status: pulumi.Output<ServiceStatus>;
Most recently observed status of the service. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
property urn
urn: Output<URN>;
urn is the stable logical URN used to distinctly address a resource, both before and after deployments.
Thank you for your feedback!
If you have a question about how to use Pulumi, reach out in Community Slack.
Open an issue on GitHub to report a problem or suggest an improvement.