Getting Started with kops on DigitalOcean
WARNING: digitalocean support on kops is currently alpha meaning it is in the early stages of development and subject to change, please use with caution.
How To Create a DigitalOcean Space and API Key
How to Point to DigitalOcean Nameservers From Common Domain Registrars
Environment Variables
export KOPS_STATE_STORE=do://admatic # where <bucket-name> is the name of the bucket you set earlier
export DIGITALOCEAN_ACCESS_TOKEN=568c46b36b097fcac413fa0f6275aae0ac6a8758f6ed80d7ba5b55fa87c8bd85
# DigitalOCcean Spaces is S3 compatible so we just override some S3 configurations to talk to our bucket
export S3_ENDPOINT=sgp1.digitaloceanspaces.com
export S3_ACCESS_KEY_ID=3U2VVE3DUPJZZJ4P5ZFY # where <access-key-id> is the Spaces API Access Key for your bucket
export S3_SECRET_ACCESS_KEY=DpGtvCpehYoH9Qt1frCmAwYJTm8g6pj+LSiTQkZ4pEo # where <secret-key> is the Spaces API Secret Key for your bucket
# this is required since DigitalOcean support is currently in alpha so it is feature gated
export KOPS_FEATURE_FLAGS="AlphaAllowDO"
Creating a Cluster
# coreos (the default) + flannel overlay cluster in tor1
kops create cluster --cloud=digitalocean --name=my-cluster.adithya321.me --networking=flannel --zones=sgp1 --ssh-public-key=~/.ssh/id_rsa.pub
kops update cluster my-cluster.adithya321.me --yes
# ubuntu + weave overlay cluster in nyc1 using larger droplets
kops create cluster --cloud=digitalocean --name=my-cluster.adithya321.me --image=ubuntu-16-04-x64 --networking=weave --zones=nyc1 --ssh-public-key=~/.ssh/id_rsa.pub --node-size=s-8vcpu-32gb
kops update cluster my-cluster.adithya321.me --yes
# debian + flannel overlay cluster in ams3 using optimized droplets
kops create cluster --cloud=digitalocean --name=my-cluster.adithya321.me --image=debian-9-x64 --networking=flannel --zones=ams3 --ssh-public-key=~/.ssh/id_rsa.pub --node-size=c-4
kops update cluster my-cluster.adithya321.me --yes
# to delete a cluster
kops delete cluster my-cluster.adithya321.me --yes
Features Still in Development
kops for DigitalOcean currently does not support these features:
- multi master kubernetes clusters
- rolling update for instance groups
- multi-region clusters