openssl genrsa -out tej.key 2048
openssl req -new -key tej.key -out tej.csr -subj "/CN=tej"
openssl x509 -req -in tej.csr -CA /etc/kubernetes/pki/ca.crt -CAkey /etc/kubernetes/pki/ca.key -CAcreateserial -out tej.crt -days 365
openssl x509 -in tej.crt -text -noout
kubectl config set-cluster cloud --certificate-authority=/etc/kubernetes/pki/ca.crt --embed-certs=true --server=https://${MASTER_IP}:6443
kubectl config set-credentials tej@kubernetes --client-certificate="/root/tej.crt" --client-key="/root/tej.key" --embed-certs=true
We are using kubernetes cluster at present
kubectl config set-context tej@kubernetes --cluster=kubernetes --user=tej@kubernetes
kubectl config get-clusters
kubectl config use-context tej@kubernetes