docker_advanced_k8s_deploy_pod_deployment

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
docker_advanced_k8s_deploy_pod_deployment [2020/05/01 15:51] andonovjdocker_advanced_k8s_deploy_pod_deployment [2020/05/01 16:54] (current) andonovj
Line 20: Line 20:
  
 ===InterPod Communication=== ===InterPod Communication===
 +This is the communication between different pods:
 +
 {{:interpodcommunication.jpg?600|}} {{:interpodcommunication.jpg?600|}}
  
 ===IntraPod Communication=== ===IntraPod Communication===
 +This is the communication between different containers within the same pod. Rarely you will see more than one container in a pod, BUT it is possible.
 +
 {{:intrapodcommunication.jpg?300|}} {{:intrapodcommunication.jpg?300|}}
  
Line 72: Line 76:
 So let's create it :) So let's create it :)
  
-===Create the Pod===+====Create the Pod====
 The creation of the pod is done using the kubectl and using the YML file (in my case pod.yml) The creation of the pod is done using the kubectl and using the YML file (in my case pod.yml)
  
Line 141: Line 145:
  
 Congrats, that was your first manual pod deployment. Congrats, that was your first manual pod deployment.
 +
 +====Check the Container===
 +So we know that a pod runs one, in some cases more, container(s). 
 +We can check our servers, in my case, it was on the 2nd Worker:
 +
 +<Code:Bash|Check the container>
 +root@node-2:~# docker container ls
 +CONTAINER ID        IMAGE                     COMMAND                  CREATED             STATUS              PORTS               NAMES
 +0709a53a0b8b        andonovj/httpserverdemo   "dotnet HttpServerDe…"   25 minutes ago      Up 25 minutes                           k8s_hello-ctr_date-pod_default_2445c62d-2329-40ba-b026-e2c98031366c_0
 +root@node-2:~#
 +</Code>
 +
 +So we have 1 requested image running and 1 is running on the 2nd worker.
 +What if we want to delete a pod. Well very simple:
 +
 +====Delete a pod====
 +To delete a pod, again use the kubectl command as follows:
 +
 +<Code:Bash|Delete a pod>
 +ubuntu@k8s-master:~$ kubectl get pods
 +NAME       READY   STATUS    RESTARTS   AGE
 +date-pod   1/    Running            38m
 +ubuntu@k8s-master:~$ kubectl delete pod date-pod
 +pod "date-pod" deleted
 +ubuntu@k8s-master:~$
 +</Code>
 +
 +But what if we want to have more security and load balancing. Let's say, what if we want 5 replica of that pod. Well, that is for the replication controller which we will discsuss in the next section.
  • docker_advanced_k8s_deploy_pod_deployment.1588348277.txt.gz
  • Last modified: 2020/05/01 15:51
  • by andonovj