Pods basic questions - neerajk555/Kubernetes GitHub Wiki
Kubernetes Pod Basics – Questions List
-
Create a Pod Running Python HTTP Server
Create a Pod namedpython-web
that runs a container from thepython:3.11-slim
image. Use it to serve an HTTP server on port 8000 usingpython -m http.server
. -
View Logs from a Pod Running Node.js
Create a Pod namednode-logger
that uses thenode:20-alpine
image. It should print "Hello from Node.js" and then sleep. View the log output. -
Run a Shell Command in a Debian Pod
Create a Pod nameddebian-tools
using thedebian:bullseye
image. After it's running, exec into the pod and list files in/etc
. -
Pod with Environment Variable Using Alpine
Create a Pod namedenv-checker
using thealpine:3.20
image. Set an environment variableDEMO=K8sRocks
, and print it usingecho $DEMO
. -
CrashLoopBackOff Pod Using Ubuntu
Create a Pod namedfailer
using theubuntu:22.04
image that immediately fails (exits with code 1) to demonstrate theCrashLoopBackOff
status.