Deploying our microservice

We can now create our deployment. Head to the editor and create a deployment file called imagini.yml with the content I just described:

Then, use the console and type the following:

kubectl create -f imagini.yml

If nothing wrong happens, you should see a line along the lines of deployment "imagini-frontend" created, as shown in the console in the following screenshot:

Our service is now deployed. It will take some time until it is fully running. Go back to the Kubernetes Engine and click on Workloads:

Click on imagini-frontend to see how deployment is proceeding:

We see that some of the replicas are not running yet. You can hit REFRESH at the top to find out when all are ready. When they are, you'll see an OK on the previous page:

Inside the workload, you can change or destroy it, as well as scale it:

Try changing to five replicas. After a few seconds, you should now have five instances running:

On the left sidebar, click on Services:

Our service is listed, using the cluster IP endpoint. You can click on the name for more details:

Scrolling down, you'll see the service port 3000 was exported to port 80. And that's it!

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset