From the course: Certified Kubernetes Administrator (CKA) Cert Prep

Unlock this course with a free trial

Join today to access over 24,900 courses taught by industry experts.

Lesson 3 lab solution: Running static Pods

Lesson 3 lab solution: Running static Pods - Kubernetes Tutorial

From the course: Certified Kubernetes Administrator (CKA) Cert Prep

Lesson 3 lab solution: Running static Pods

- So this lab is actually easy. We need to run a static pod with the name "mypod", using an NGINX image. So this is how it works. kubectl run mypod --image=nginx --dry-run=client -o yaml. Copying the code, and it needs to run on worker-1. So on worker-1, I'm going to use: sudo vim /etc/kubernetes/manifests Because that is where your pod manifests normally are. And I'm calling it mypod.yaml, copying the code in there and saving it. And then I'm getting back to my control node, and I'm using: kubectl get pods. And there we can see mypod-worker1. It's inevitable to have the worker1 suffix to your static pods. There's nothing that you can do about it. So that concludes the solution for this lab.

Contents