Nrejve

config1

Jan 5th, 2021
621
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. for instance in worker0.mylabserver.com worker1.mylabserver.com; do
  2. kubectl config set-cluster kubernetes-the-hard-way \
  3.  --certificate-authority=ca.pem \
  4.  --embed-certs=true \
  5.  --server=https://${KUBERNETES_PUBLIC_ADDRESS}:6443 \
  6.  --kubeconfig=${instance}.kubeconfig
  7.  
  8. kubectl config set-credentials system:node:${instance} \
  9.  --client-certificate=${instance}.pem \
  10.  --client-key=${instance}-key.pem \
  11.  --embed-certs=true \
  12.  --kubeconfig=${instance}.kubeconfig
  13.  
  14. kubectl config set-context default \
  15.  --cluster=kubernetes-the-hard-way \
  16.  --user=system:node:${instance} \
  17.  --kubeconfig=${instance}.kubeconfig
  18.  
  19. kubectl config use-context default --kubeconfig=${instance}.kubeconfig
  20. done
RAW Paste Data