From the course: Certified Kubernetes Application Developer (CKAD) Cert Prep

Unlock this course with a free trial

Join today to access over 25,500 courses taught by industry experts.

Using a sidecar

Using a sidecar

- The next task is about Sidecars. Create a pod with the name "Sidepod". It should run the nginx:latest image together with a sidecar container that runs the sleep 15 command. Let me show you. Now we did it before and I'm going to do it again, do documentation. In the documentation I'm going to look for sidecar. And there we can see sidecar containers. That's not a top level link, but that's because I know that this is something that was introduced as beta in Kubernetes 1.29, and Kubernetes 1.29 is recent enough. Unfortunately very close to the top we see an example YAML file, so I'm copying the example YAML file, I'm going back to my terminal, and I'm creating task4.yaml, in which I'm going to paste everything and then we are going to tweak it. So name should be Sidepod. Oh this is a deployment. Deployment, I don't want deployment. So I need to clean it up a little bit to make it pod, 'cause that's what we need to do, right? So I am going to make that kind pod. And metadata name…

Contents