The Kubernetes provider package offers support for all Kubernetes resources and their properties.
Resources are exposed as types from modules based on Kubernetes API groups such as
storage, among many others. Additionally, support for deploying Helm charts (
and YAML files (
yaml) is available in this package. Using this package allows you to
programmatically declare instances of any Kubernetes resources and any supported resource version
using infrastructure as code, which Pulumi then uses to drive the Kubernetes API.
If this is your first time using this package, these two resources may be helpful:
- Kubernetes Getting Started Guide: Get up and running quickly.
- Kubernetes Pulumi Setup Documentation: How to configure Pulumi for use with your Kubernetes cluster.
Use the navigation below to see detailed documentation for each of the supported Kubernetes resources.
var kubernetes = require("@pulumi/kubernetes");
import * as kubernetes from "@pulumi/kubernetes";
class Provider extends ProviderResource
The provider type for the kubernetes package.
new Provider(name: string, args: ProviderArgs, opts?: pulumi.ResourceOptions)
Create a Provider resource with the given unique name, arguments, and options.
nameThe unique name of the resource.
argsThe arguments to use to populate this resource's properties.
optsA bag of options that control this resource's behavior.
getProvider(moduleMember: string): ProviderResource | undefined
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.
static register(provider: ProviderResource | undefined): Promise<string | undefined>
id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.
urn is the stable logical URN used to distinctly address a resource, both before and after deployments.
Returns the version of the package containing this file, obtained from the package.json of this package.
The set of arguments for constructing a Provider.
If present, the name of the kubeconfig cluster to use.
If present, the name of the kubeconfig context to use.
BETA FEATURE - If present and set to true, enable server-side diff calculations. This feature is in developer preview, and is disabled by default.
The contents of a kubeconfig file. If this is set, this config will be used instead of $KUBECONFIG.
If present, the default namespace to use. This flag is ignored for cluster-scoped resources. Note: if .metadata.namespace is set on a resource, that value takes precedence over the provider default.
If present and set to true, suppress apiVersion deprecation warnings from the CLI.