Docker
/Intermediate
Deploying Images to Kubernetes
Definition
The process of translating Docker constructs (like `docker run` commands) into Kubernetes YAML manifests (like Deployments and Pods) so the images can be orchestrated.
Explain Like I'm New
Instead of typing terminal commands to start containers, you write a massive YAML document describing your entire architecture, hand it to Kubernetes, and Kubernetes automatically figures out how to make it happen.
Real World Example
You have a Docker image `my-api:v1`. You write a Kubernetes `Deployment.yaml` file that says 'I want exactly 5 replicas of my-api:v1 running at all times'. Kubernetes pulls the image and spreads 5 copies across your servers.
Common Use Cases
- •DevOps engineering
- •Cluster management
Interview Questions
basic
- In Kubernetes, what is the smallest deployable unit that wraps around a Docker container?
intermediate
- If a container crashes inside a Kubernetes Pod, do you have to manually SSH into the server to type `docker restart`?