Kubernetes pod deployment

Now, in the following example, we will be deploying two NGINX replication pods (rc-pod) and exposing them via a service. To understand Kubernetes networking, please refer to the following diagram for more details. Here, an application can be exposed via a virtual IP address, and the request to be proxied, to which replica of pod (load balancer), is taken care of by the service:

Kubernetes pod deployment

Kubernetes networking with OVS bridge

  1. In the Kubernetes master, create a new folder:
    $ mkdir nginx_kube_example
    $ cd nginx_kube_example
    
  2. Create the YAML file in the editor of your choice, which will be used to deploy the NGINX pod:
    $ vi nginx_pod.yaml ...

Get Troubleshooting Docker now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.