Skip to content

Latest commit

 

History

History
61 lines (40 loc) · 1.7 KB

File metadata and controls

61 lines (40 loc) · 1.7 KB

WARMUP: Make a Pod!

Description of the image

  1. Create a pod to the following specs!
  1. Confirm that your pod is running with a kubectl get pod day2-warmup command! It should be in a RUNNING state! (if it is in a ContainerCreating state try again in a few seconds)

WANT TO TRY SOMETHING COOL?

  1. 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.0

    This will use your kubectl connection to temporarily open a port-forward between your local machine and your pod!

  2. Split your screen with TMUX (ctrl b, hands off keyboard, shift 5).

  3. Hop back into oss.

    student@bchd~$ ssh oss

  4. Try the following curl commands. They will only work IF you created your pod correctly AND if your port-forward command is still working!

    student@oss~$ curl localhost:2224

    student@oss~$ curl localhost:2224/tmnt

    student@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: 5055

To apply this YAML file:

kubectl apply -f pod.yaml