Difficulty: intermediate
Estimated Time: 10-15 minutes

This presentation drives you thought a basic kubernetes example.

-Aniket Gawade

Don’t stop now! The next scenario will only take about 10 minutes to complete.

Kube demo 101

Step 1 of 3

Step 1 - Initialize k8s, create cluster and get ready

Setup

Initailize cluster

kubeadm init --token=102952.1a7dd4cc8d1f4cc5

If you have stale setup you can run kubeadm reset

Token info

kubeadm token list

Setting environment created by kubeadm

sudo cp /etc/kubernetes/admin.conf $HOME/
sudo chown $(id -u):$(id -g) $HOME/admin.conf
export KUBECONFIG=$HOME/admin.conf

Lets join our node

kubeadm join --token=102952.1a7dd4cc8d1f4cc5 [[HOST_IP]]:6443

Let check k8s pods

kubectl get pod -n kube-system

Check if node is connected to master

kubectl get nodes

This setup requires weave CNI

kubectl apply -f /opt/weave-kube

Check component status:

kubectl get cs

Cluster info:

kubectl cluster-info

Logs:

kubectl logs kube-apiserver-master -n kube-system

Terminal Host 2