Difficulty: beginner
Estimated Time: 10 minutes

In this scenario, we will deploy a simple application to our existing kubernetes cluster using a kubernetes object called Deployment.

Deploy a simple application

Step 1 of 5

Create a new deployment

Create a deployment

In this step we will create a new deployment. We will use nginx web server image for that.

Execute kubectl create deployment nginx --image=nginx.

Above command will create a deplyment from image of nginx web server.

We can use command kubectl get deployments to check if our new deployment is created.

If it is successfully created, we get output like one mentioned below.

master $ kubectl get deployments
nginx     1         1         1            1           10s

View the details of deployment

Use command kubectl describe deployment nginx to retrieve the details of our newly created deployment. It shows details like name, namespace, selectors and many others.

Terminal Host 2