-
Notifications
You must be signed in to change notification settings - Fork 2
/
kubeconfig.txt
23 lines (13 loc) · 944 Bytes
/
kubeconfig.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
kubectl -n kube-public create configmap cluster-info \
--from-file /etc/kubernetes/cert/ca.pem \
--from-file /etc/kubernetes/bootstrap.kubeconfig
kubectl config --kubeconfig=config-java set-cluster development --server=https://10.60.1.20:6443 --certificate-authority=/etc/kubernetes/cert/ca.pem
kubectl config --kubeconfig=config-java set-credentials developer --client-certificate=/etc/kubernetes/cert/server.pem --client-key=/etc/kubernetes/cert/server-key.pem
kubectl config --kubeconfig=config-java set-context dev-enviroment --cluster=development --namespace=enviroment --user=developer
kubectl config --kubeconfig=config-java view
kubectl config --kubeconfig=config-java use-context dev-enviroment
kubectl config --kubeconfig=config-java view --minify
export KUBECONFIG=/etc/kubernetes/bootstrap.kubeconfig
export KUBECONFIG_SAVED=$KUBECONFIG
export KUBECONFIG=$KUBECONFIG:config-java
kubectl config view