Created
August 15, 2017 15:52
-
-
Save fabiocruzcoelho/9b6700ae4bd9f72caacba9955cc52f76 to your computer and use it in GitHub Desktop.
Comando kubectl config
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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