<p>I have a Docker image with the CMD to run a Java application.</p>
<p>This application is being deployed to container into Kubernetes. Since, I am deploying it as a Docker image, I was expecting it as running as a Docker process. So, I just logged into the pods and was trying &quot;<strong>docker ps</strong>&quot;.</p>
<p>But, I was surprised that it is running as a Java process and not as a docker process. I am able to see the process by &quot;<strong>ps -ef</strong>&quot;</p>
<p>I am confused, how does it work internally?</p>

user1578872
<p>As others stated, <strong>Kubernetes uses docker internally to deploy the containers</strong>. To explain in detail consider the cluster which has 4 nodes, 1 master and 3 slaves.</p>

<pre><code>$ kubectl get nodes
NAME                           STATUS    ROLES     AGE       VERSION
******.mylabserver.com   Ready     master    13d       v1.10.5
******.mylabserver.com   Ready     &lt;none&gt;    13d       v1.10.5
******.mylabserver.com   Ready     &lt;none&gt;    13d       v1.10.5
******.mylabserver.com   Ready     &lt;none&gt;    13d       v1.10.5
</code></pre>

<p>I am deploying a pod with <strong>nignx docker image</strong>.</p>

<pre><code>$ cat pod-nginx.yml 
apiVersion: v1
kind: Pod
metadata:
  name: alpine
  namespace: default
spec:
  containers:
  - name: alpine
    image: alpine
    command:
      - sleep
      - "3600"
    imagePullPolicy: IfNotPresent
  restartPolicy: Always
</code></pre>

<p>You can get the status of the pod as below:</p>

<pre><code>$ kubectl get pods -o wide
NAME      READY     STATUS    RESTARTS   AGE       IP           NODE
alpine    1/1       Running   0          21s       10.244.3.4   ******.mylabserver.com
</code></pre>

<p><strong>Kube-scheduler</strong> will schedule the pod on one of the available nodes.</p>

<p>Now the pod is deployed to a server, where you can login to that particular server and find the information that you are looking for.    </p>

<pre><code>root@******:/home/user# docker ps
CONTAINER ID        IMAGE                                                                            COMMAND                  CREATED              STATUS         
     PORTS               NAMES
6486de4410ad        alpine@sha256:e1871801d30885a610511c867de0d6baca7ed4e6a2573d506bbec7fd3b03873f   "sleep 3600"             58 seconds ago       Up 57 seconds  
                         k8s_alpine_alpine_default_2e2b3016-79c8-11e8-aaab-
</code></pre>

<p>Run the <code>docker exec</code> command in that server to see the process running inside.</p>

<pre><code>root@******:/home/user# docker exec -it 6486de4410ad /bin/sh
/ # ps -eaf
PID   USER     TIME   COMMAND
    1 root       0:00 sleep 3600
    7 root       0:00 /bin/sh
   11 root       0:00 ps -eaf
/ # 
</code></pre>

<p><a href="https://kubernetes.io/docs/home/-" rel="noreferrer">https://kubernetes.io/docs/home/-</a> this can give you more info about pods and how deployments happen with pods/containers.</p>

<p>Hope this helps.</p>
