- Create a pod to the following specs!
- IMAGE:
registry.gitlab.com/alta3-instructor/tmnt - POD NAME:
day2-warmup - CONTAINER PORT:
5055 - CONTAINER NAME:
pizzaparty - Click here for a manifest you can use!
- Confirm that your pod is running with a
kubectl get pod day2-warmupcommand! It should be in a RUNNING state! (if it is in aContainerCreatingstate try again in a few seconds)
WANT TO TRY SOMETHING COOL?
-
When you've confirmed the pod is running successfully, run this command:
student@oss~$kubectl port-forward day2-warmup 2224:5055 --address=0.0.0.0This will use your
kubectlconnection to temporarily open a port-forward between your local machine and your pod! -
Split your screen with TMUX (
ctrl b, hands off keyboard,shift 5). -
Hop back into
oss.student@bchd~$ssh oss -
Try the following
curlcommands. They will only work IF you created your pod correctly AND if your port-forward command is still working!student@oss~$curl localhost:2224student@oss~$curl localhost:2224/tmntstudent@oss~$curl localhost:2224/splinter
Click to view the solution!
apiVersion: v1
kind: Pod
metadata:
name: wednesday-warmup
spec:
containers:
- name: pizzaparty
image: registry.gitlab.com/alta3-instructor/tmnt
ports:
- containerPort: 5055To apply this YAML file:
kubectl apply -f pod.yaml