Advertisement
Javi

k8s: Launch cluster with kops

Mar 5th, 2019
148
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1.  
  2. export AWS_DEFAULT_REGION=eu-west-1
  3. export CLUSTER_NAME=kops-$RANDOM
  4. export KOPS_STATE_STORE=s3://k8scourse
  5. export DOMAIN=aprender.cloud
  6. export EDITOR=vim
  7.  
  8. ssh-keygen -t rsa -b 2048 -f kops -N ""
  9.  
  10. kops create cluster \
  11. --state $KOPS_STATE_STORE \
  12. --name $CLUSTER_NAME.$DOMAIN \
  13. --master-size t2.medium \
  14. --master-count 1 \
  15. --master-zones eu-west-1c \
  16. --node-count 3 \
  17. --node-size t2.medium \
  18. --zones eu-west-1a,eu-west-1b,eu-west-1c \
  19. --networking calico \
  20. --cloud-labels "Owner=kops,Project=$CLUSTER_NAME" \
  21. --ssh-public-key kops.pub \
  22. --authorization RBAC \
  23. --yes
  24.  
  25. export CLUSTER_NAME=kops-$RANDOM
  26. kops get clusters
  27. kops export kubecfg --name ciberadokops.aprender.cloud
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement