What command does kubernetes run to launch a container?

12/5/2019

When I specify a Deployment in a kubernetes yaml file, for example:

apiVersion: apps/v1
kind: Deployment
metadata:
  name: my-deployment
spec:
  selector:
    matchLabel:
      deploy: example
  template:
    metadata:
      labels:
        deploy: example
    spec:
      containers:
        - name: my-container
          image: dockerhub.com/imagerepo:latest

I'm wondering what's going on in the backend to run my deploy:example pod. I'm guessing some sort of docker run <image> && docker start <image> command is executed on each node, but what exactly is the command?

-- Robert Yi
docker
kubernetes

0 Answers