You'll need to switch to your Kubernetes VM to complete this warmup. Here's a reminder of what to do:
-
Create a pod!
student@bchd~$vim bustedpodwarmup.ymlapiVersion:v1 kind: pod metadata: name: warmup-pod spec: containers: - name: nginx-container image: nnnginx ports: - name: http-port containerPort: 80 protocol: TCP
The manifest for the above Pod is BUSTED- it will fail if you try to create it! Your task is to attempt to fix the manifest and create a functional pod!
-
When you're ready to try your manifest, create it like so:
student@bchd~$kubectl apply -f bustedpodwarmup.yml -
Confirm that your pod is working. The status must say
RUNNINGfor you to declare victory! (if it is in aContainerCreatingstate try again in a few seconds)student@bchd~$kubectl get pod warmup-pod
Click here for hints!
- you always need a whitespace after every
: - incorrect capitalization can cause errors!
- the most common reason to get the
ErrImgPullstatus is due to a misspelling - indentation must remain consistent in YAML
Click here to see the solution!
apiVersion: v1 # Must have a whitespace after the ":"
kind: Pod # "kind" values must be capitalized correctly
metadata:
name: warmup-pod
spec:
containers:
- name: nginx-container
image: nginx # TYPO! nginx, not nnnginx
ports:
- name: http-port
containerPort: 80
protocol: TCP # indentation error! "protocol" needs bumped to the left