Updated: Hello World in K8s using Nutanix Karbon

Getting started with Karbon and K8s in general can seem like a daunting task.  I wanted to create a simple “Hello World” website in K8s.  This is meant for people just starting to explore and play with K8s.  I am using Google and MetalLB to accomplish this.

Download *kubectl.cfg file from Karbon and export path for use with kubectl

Verify environment with kubectl get nodes

Create the Google “hello-app” in Karbon.  This is from the Google quick-start guide here.

After the app is deployed you need to create a service using “kubectl expose deployment” to allow external traffic

Optional, but recommend would be to add the MetalLB load-balancer here

Apply a layer 2 config that has your IP range.  We will download and edit the example form MetalLB.  In this example we are using

Now apply the L2 configuration

The previous “hello-app” will now get an external IP from MetalLB

You can now open a browser to your EXTERNAL-IP and verify the Google “hello-app” is responding

You May Also Like

About the Author: devmin

systems architect with interest in automation, k8s, linux, devops, bash, real estate, anonymity

Leave a Reply

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