Creating a Pod
Course: Kubernetes Part 1 - chapter 7
There were 5 jargons we learnt about
- Cluster
- Nodes
- Images
- Containers
- Pods
We have created a cluster of 3 nodes
How can we deploy a single container from an image inside a pod ?
Finding a good image
Section titled “Finding a good image”Let’s try to start this image locally - https://hub.docker.com/_/nginx
Starting using docker
Section titled “Starting using docker”docker run -p 3005:80 nginx
Try visiting localhost:3005

Starting a pod using k8s
Section titled “Starting a pod using k8s”- Start a pod
kubectl run nginx --image=nginx --port=80- Check the status of the pod
kubectl get pods- Check the logs
kubectl logs nginx
- Describe the pod to see more details

What our system looks like right now
Section titled “What our system looks like right now”
Good questions to ask
- How can I stop a pod?
- How can I visit the pod? Which port is it available on?
- How many pods can I start?