🧠 Fresh K8s Challenge! Can You Crack These? 🚀

Hey K8s gurus and aspiring pros! Ready for another round of brain teasers to sharpen those Kubernetes skills? I've cooked up 5 new questions just for you! 🤔

Show off your expertise! Post your answers in the comments below using the format:

  1. [Your Answer]

  2. [Your Answer]

  3. [Your Answer]

  4. [Your Answer]

  5. [Your Answer]

(e.g., 1a, 2b, 3c, 4d, 5a)

Let's dive in! 👇


🧠 Question 1: Networking Know-How

In Kubernetes, what is the primary role of a Service of type ClusterIP?

a) To provide an external IP address for accessing applications from outside the cluster.

b) To provide a stable internal IP address and DNS name for accessing a set of Pods within the cluster.

c) To directly manage network policies and firewall rules between Pods.

d) To assign a unique, routable IP address to each Pod in the cluster.


🧠 Question 2: Storage Smarts

What Kubernetes object is typically used to request storage from a StorageClass for a Pod, allowing for dynamic provisioning of persistent storage?

a) PersistentVolume (PV)

b) StorageClass (SC)

c) PersistentVolumeClaim (PVC)

d) ConfigMap


🧠 Question 3: Workload Wisdom

If you need to run a batch job that processes data and then terminates, which Kubernetes workload resource is most appropriate?

a) Deployment

b) StatefulSet

c) DaemonSet

d) Job


🧠 Question 4: Configuration Puzzler

How can you securely store and manage sensitive information, like passwords or API keys, for your applications running in Kubernetes?

a) By embedding them directly in the Pod definition.

b) By using ConfigMaps.

c) By using Secrets.

d) By writing them to environment variables within the container image.


🧠 Question 5: Troubleshooting Teaser

You're trying to figure out why a Pod is not starting correctly. Which kubectl command is most commonly used to view the logs of a specific container within a Pod?

a) kubectl describe pod <pod-name>

b) kubectl get events --field-selector involvedObject.name=<pod-name>

c) kubectl logs <pod-name> -c <container-name>

d) kubectl exec -it <pod-name> -- /bin/sh


Looking forward to seeing your answers flood the comments! Let the K8s knowledge shine! ✨ I'll be back with the correct answers and explanations soon.

Good luck, everyone! You've got this! 💪