Pods basic questions - neerajk555/Kubernetes GitHub Wiki

Kubernetes Pod Basics – Questions List

  1. Create a Pod Running Python HTTP Server
    Create a Pod named python-web that runs a container from the python:3.11-slim image. Use it to serve an HTTP server on port 8000 using python -m http.server.

  2. View Logs from a Pod Running Node.js
    Create a Pod named node-logger that uses the node:20-alpine image. It should print "Hello from Node.js" and then sleep. View the log output.

  3. Run a Shell Command in a Debian Pod
    Create a Pod named debian-tools using the debian:bullseye image. After it's running, exec into the pod and list files in /etc.

  4. Pod with Environment Variable Using Alpine
    Create a Pod named env-checker using the alpine:3.20 image. Set an environment variable DEMO=K8sRocks, and print it using echo $DEMO.

  5. CrashLoopBackOff Pod Using Ubuntu
    Create a Pod named failer using the ubuntu:22.04 image that immediately fails (exits with code 1) to demonstrate the CrashLoopBackOff status.