The following are tasks written as they might appear in the CKA exam! Remember, the CKA is notorious for being vague in what specific tools are required to achieve these tasks... so if you'd like a hint about what the task is asking you to do, click the dropdown!
Find which pod in your cluster is consuming the most memory. Write the name of that pod to a file named /tmp/hogpod.txt
HINT
Use the kubectl top pods command against all namespaces in the cluster and find which has the highest memory usage!
- Create a pod to the following specs!
- IMAGE:
registry.gitlab.com/alta3-instructor/tmnt - POD NAME:
warmup-pod - CONTAINER PORT:
5055 - CONTAINER NAME:
pizzaparty
-
Confirm that your pod is running with a
kubectl get pod warmup-podcommand! It should be in a RUNNING state! (if it is in aContainerCreatingstate try again in a few seconds) -
When the pod is running, run this command:
kubectl port-forward warmup-pod 2224:5055 --address=0.0.0.0 -
Then open
aux1! You can also add/tmntand/splinterto the end of the aux1 address bar to see different pages.
SOLUTION
apiVersion: v1
kind: Pod
metadata:
name: warmup-pod
spec:
containers:
- name: pizzaparty
image: registry.gitlab.com/alta3-instructor/tmnt
ports:
- containerPort: 5055