-
Notifications
You must be signed in to change notification settings - Fork 165
NewUserSetup
devopswithcloud edited this page Mar 4, 2022
·
1 revision
curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add -
cat <<EOF | sudo tee /etc/apt/sources.list.d/kubernetes.list
deb https://apt.kubernetes.io/ kubernetes-xenial main
EOF
sudo apt-get update
sudo apt-get install -y kubectl=1.19.1-00
sudo apt-mark hold kubectl
$ kubectl create ns development
$ openssl genrsa -out maha.key 2048
$ openssl req -new -key maha.key \ -out maha.csr -subj "/CN=maha/O=development"
Generate a self-signed certificate. Use the CA keys for the Kubernetes cluster and set the certificate expiration.
$ sudo openssl x509 -req -in maha.csr \
-CA /etc/kubernetes/pki/ca.crt \
-CAkey /etc/kubernetes/pki/ca.key \ -CAcreateserial \ -out maha.crt -days 45