Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

kubernetes cert kubeconfig

KUBECONFIG=<filename> kubectl config set-cluster default-cluster --server=https://<host ip>:6443 --certificate-authority <path-to-kubernetes-ca> --embed-certs
KUBECONFIG=<filename> kubectl config set-credentials <credential-name> --client-key <path-to-key>.pem --client-certificate <path-to-cert>.pem --embed-certs
KUBECONFIG=<filename> kubectl config set-context default-system --cluster default-cluster --user <credential-name>
KUBECONFIG=<filename> kubectl config use-context default-system
Source by kubernetes.io #
 
PREVIOUS NEXT
Tagged: #kubernetes #cert #kubeconfig
ADD COMMENT
Topic
Name
2+5 =