Skip to content

Instantly share code, notes, and snippets.

@fabiocruzcoelho
Created August 15, 2017 15:52
Show Gist options
  • Save fabiocruzcoelho/9b6700ae4bd9f72caacba9955cc52f76 to your computer and use it in GitHub Desktop.
Save fabiocruzcoelho/9b6700ae4bd9f72caacba9955cc52f76 to your computer and use it in GitHub Desktop.
Comando kubectl config
# Configura Cluster com certificado CA
kubectl config set-cluster <cluster name> --server=https://master.exemplo.local:6443 \
--certificate-authority=${PWD}/ssl/prod/ca.pem
# Configura credenciais
kubectl config set-credentials prod-admin --certificate-authority=${PWD}/ssl/prod/ca.pem \
--client-key=${PWD}/ssl/prod/admin-docker01-key.pem --client-certificate=${PWD}/ssl/prd/admin-docker01.pem
# Configura Contexto para o cluster
kubectl config set-context prod --cluster=prod --user=prod-admin
# Muda de Cluster
kubectl config use-context prod
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment