Deploying to Kubernetes

From the same Terminal that you used to remote access the UCP cluster to deploy the pets application as a stack using Docker Swarm as the orchestration engine, we can now try to deploy the pets application to the UCP cluster using Kubernetes as the orchestration engine.

Make sure you're still in the labs/ch14/ucp folder. Use kubectl to deploy the pets application. First test that we can get all the nodes of the cluster with the Kubernetes CLI:

Getting all the nodes of the UCP cluster using the Kubernetes CLI

Apparently, my environment is configured correctly and kubectl can indeed list all the nodes in the UCP cluster. That means I can now deploy the pets application using the definitions in file pets.yaml:

Creating the pets application in the UCP cluster using the Kubernetes CLI

We can list the objects created by using kubectl get all. In a browser, we can then navigate to http://<IP address>:<port> to access the pets application, where <IP address> is the public IP address of one of the UCP cluster nodes and <port> is the port published by the Kubernetes service web

We have created a cluster of three VMs in an AWS ASG and have installed Docker and UCP 3.0 on them. We then deployed our famous pets application into the UCP cluster, once using Docker Swarm as the orchestration engine and once Kubernetes. 

Docker UCP is a platform agnostic container platform that offers a secure enterprise grade software supply chain on any cloud and on-premise, on bare metal, or on virtualized environments. It even offers the freedom of choice when it comes to orchestration engines. The user can choose between Docker Swarm and Kubernetes. It is even possible to run applications in both orchestrators in the same cluster.