How to Deploy a test app on Kubernetes on vSphere

In this guide I will show you how to deploy a test app on Kubernetes running on vSphere.

Pre-Reqs:

Kubernetes installed and configured on vSphere using this guide https://github.com/kubernetes/kubernetes-anywhere/blob/master/phase1/vsphere/README.md

Use kubectl to deploy a stateless container

kubectl run --image=vmtocloud/myblog vmtocloud-myblog --port=80 --env="DOMAIN=cluster"

Use a service to access the application

kubectl expose deployment vmtocloud-myblog --type=NodePort --name=vmtocloud-myblog

Get the NodePort

kubectl describe services vmtocloud-myblog

Get the cluster external IP

kubectl cluster-info

Open a web browser to the app

In my example the address is http://192.168.2.122:32301

View stats on your running app in the Kubernetes Dashboard

Remember, sharing is caring ->Tweet about this on Twitter12Share on Facebook0Share on LinkedIn10Share on Google+0Email this to someone

One thought on “How to Deploy a test app on Kubernetes on vSphere

  1. Pingback: Containers for the vSphere Admin: After School Special Update – VMtoCloud.com

Leave a Reply

Your email address will not be published. Required fields are marked *

*