# Assignment The Nautilus DevOps team is diving into Kubernetes for application management. One team member has a task to create a pod according to the details below: Create a pod named pod-httpd using the httpd image with the latest tag. Ensure to specify the tag as httpd:latest. Set the app label to httpd_app, and name the container as httpd-container. Note: The kubectl utility on the jump-host has been configured to work with the Kubernetes cluster. # Solution # Kubernetes Pod — `pod-httpd` A single pod running the `httpd:latest` image, with an `app: httpd_app` label and a named container. Applied inline via a heredoc — no manifest file on disk. ## Apply (heredoc → kubectl) ```bash kubectl apply -f - <<'EOF' apiVersion: v1 kind: Pod metadata: name: pod-httpd labels: app: httpd_app spec: containers: - name: httpd-container image: httpd:latest EOF ``` ## How it works ### The heredoc apply pattern - **`kubectl apply -f -`** — the `-f -` tells kubectl to read the manifest from **stdin** instead of a file. The heredoc feeds the YAML straight in, so nothing is written to disk. - **`<<'EOF'` (delimiter quoted)** — quoting `EOF` disables shell expansion inside the body, so any `$VAR`, backticks, or `$(...)` in a manifest stay literal rather than being interpreted by the shell. For Kubernetes YAML this is almost always what you want. Use unquoted `< If the pod sits in `ImagePullBackOff`, the node may be offline or rate-limited on the > pull. `kubectl describe pod pod-httpd` shows the pull events under `Events:`.