Skip to content

Latest commit

 

History

History
45 lines (26 loc) · 1.31 KB

lab3.md

File metadata and controls

45 lines (26 loc) · 1.31 KB

Lab CKAD Configuration

Objective

The focus of this lab is to become familar with quickly starting a pod imperatively. This lab is also setup to understand how to debug and env either by starting a shell in a pod or by executing a pod with a specific command.

  1. Execute an imperative command to see what is in a standard Pods ENV
kubectl run busybox --image=busybox --command --restart=Never -- env

How do you see the output?

  1. Add an ENV to the pod from step 1. (you'll like to add it to the yaml and replace)

  2. Create a config map with the key APP_ENV and value of dev

  3. Create a pod that shows the mapping

  4. Create a namespace foo, what is the value of the service account token?

  5. Start a shell in a pod (start an nginx pod if one isn't running) and view the mounted token.

k exec -it nginx /bin/bash

  1. Recreate cluster with multi-nodes and run nginx pod
# needs kind and kubectl on path
./setup-lab3.sh

wait for "Lab 3 is Ready"

Launch a standard pod: k run nginx --image nginx

What is the status? Why?

Fix the pod.

  1. What does the following command do?

kubectl patch nodes kind-worker -p '{"spec":{"taints":[]}}'

  1. Node kind-worker has a label that doesn't exist on kind-worker2. Create a pod that has node affinity to this node kind-worker passed on this label.