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

Unlock this course with a free trial

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

Working with namespaces

Working with namespaces

- All right, let's talk about the first assignment working with namespaces. That was the assignment, create a namespace with the name Indiana. And in this namespace, create a pod with the name inpod that runs the latest version of Nginx. In the same namespace, create a Secret with the name insecret that stores the variable COLOR with the value blue, and ensure that the poD uses the Secret to define the variable. So what were you supposed to do? Well, let me show you. So kubectl create ns indiana. The complex thing in this assignment is, you need to create a pod with the name inpod that runs the latest version of the Nginx image, and the pod needs to mount a Secret. So you can't use kubectl set env, kubectl set env doesn't work on pods, it only works on deployments. So you know what I am going to do? I am going to create a deployment, and then I'm going to catch the code from the deployment. And based on that, I create my pod. Alternatively, you can try to find the information in the…

Contents