Skip to content

Instantly share code, notes, and snippets.

@bricef
Created November 13, 2020 00:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bricef/e23c96a16a1d626651304a80edd4831a to your computer and use it in GitHub Desktop.
Save bricef/e23c96a16a1d626651304a80edd4831a to your computer and use it in GitHub Desktop.
Basic pulumi digital ocean k8s cluster
import pulumi
import pulumi_digitalocean as do
config = pulumi.Config()
# Define a digital ocean cluster
cluster = do.KubernetesCluster(
"brice-demo-cluster",
node_pool={
"name": "worker-pool",
"node_count": 2,
"size": "s-1vcpu-2gb",
},
region="lon1",
version="1.19.3-do.2"
)
# Expose the kubeconfig
pulumi.export("pulumi-kubeconfig", cluster.kube_configs[0]["rawConfig"])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment