Skip to content

Instantly share code, notes, and snippets.

@hangyan
Forked from jangaraj/Remote-kubectl
Created May 26, 2017 02:52
Show Gist options
  • Save hangyan/2628cb641f98f69cba024a91da8efa5a to your computer and use it in GitHub Desktop.
Save hangyan/2628cb641f98f69cba024a91da8efa5a to your computer and use it in GitHub Desktop.
kubectl config set-cluster default-cluster --server=https://master_ip --certificate-authority=ssl/ca.pem
kubectl config set-credentials default-admin --certificate-authority=ssl/ca.pem --client-key=ssl/admin-key.pem --client-certificate=ssl/admin.pem
kubectl config set-context default-system --cluster=default-cluster --user=default-admin
kubectl config use-context default-system
# obviously you need the CA used to bootstrap your cluster and all the certificates
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment