Demo - PODs (how to create 3 nodes)

I am unable to understand how the trainer logged into the 3 node cluster with one master and 2 worker nods to create a new directory and add a yaml file in it.
Currently i have
kubectl get pods
nginx 1/1 Running 0 54m

It doesnt say master or node. How do i set this up?


Hi Ali,

Can you explain a bit about your set up?

is it set up using minikube or kubeadm?

Do you have multiple nodes in your cluster ( as per the set up demonstrated in the appendix section - kubeadm install)?

I ask this because, when you run a pod using kubectl, it will most likely be scheduled to run on the worker (unless its a one node cluster)

Hello Vijin,
THe setup is done as per the trainer explained it. On minikube. But then he logs into the master and two nodes which was not shown in the video. Its a 1 node cluster.

C:\Windows\system32>minikube status
type: Control Plane
host: Running
kubelet: Running
apiserver: Running
kubeconfig: Configured

C:\Windows\system32>kubectl get pods
No resources found in default namespace.

C:\Windows\system32>kubectl run nginx
Error: required flag(s) “image” not set

C:\Windows\system32>kubectl run nginx --image=nginx
pod/nginx created

C:\Windows\system32>kubectl get pods
nginx 1/1 Running 0 7s

For that demo, the trainer is using a different cluster to show that demo.

But you can use minikube for all the topics covered.

There is a separate video that comes a bit later where its shown how to install a multi node cluster using the “kubeadm” tool.