Skip to content

Instantly share code, notes, and snippets.

@5tefan
Created October 9, 2016 02:30
Show Gist options
  • Save 5tefan/6d0f56934562725d93a95bfc2f29d91a to your computer and use it in GitHub Desktop.
Save 5tefan/6d0f56934562725d93a95bfc2f29d91a to your computer and use it in GitHub Desktop.
kubectl setup
export MASTER_HOST=your_master_ip
export CA_CERT=your_ca.pem
export ADMIN_CERT=your_admin.pem
export ADMIN_KEY=your_admin-key.pem
kubectl config set-cluster default-cluster \
--server=https://$MASTER_HOST --certificate-authority=$CA_CERT
kubectl config set-credentials default-admin \
--certificate-authority=$CA_CERT --client-key=$ADMIN_KEY --client-certificate=$ADMIN_CERT
kubectl config set-context default-system --cluster=default-cluster --user=default-admin
kubectl config use-context default-system
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment