Kubernetes Application Configuration

In this Cloud Native Short Take, instructor Christian Lacsina reviews the RX-M Kubernetes Application Configuration module. Specifically, he looks at how to configure applications to run on Kubernetes and how common configuration paradigms are implemented on the platform. Additionally, Christian discusses the concept of spec portability and demonstrates how to create and consume secrets and config map resources in Kubernetes.

Overall, this video provides valuable insights into the Kubernetes Application Configuration and how to optimize your applications for Kubernetes. Whether you’re a beginner or an experienced user, this short take is a must-watch!

Video Summary

Welcome to another RX-M Cloud Native Short Take where we’re reviewing the RX-M Kubernetes Application Configuration module. 

In this module, we configure our applications to run on Kubernetes. First, we discuss how common configuration paradigms are implemented at Kubernetes. We’ll also discuss the concept of spec portability. We’ll then take a look at how to create and consume secrets and ConfigMap resources in Kubernetes, and then lastly, we also demonstrate the use of the downward API. 

In this short take demo, we look at how we can realize the concept of portability in Kubernetes by deploying one pod spec across multiple namespaces and observing different behavior from that pod in each namespace to which it’s been deployed.

My Kubernetes demo cluster has two additional namespaces: dev and test. 

I prepared a pod specification for my application that I would like to deploy to both namespaces.

The pod runs a busybox container that outputs the value of an environment variable called message. The message environment variable’s value will be populated from a ConfigMap, including the key: message.

The ConfigMap can have the same name between each namespace, enabling the application to show different behavior based on where it’s deployed. For example, in the dev namespace, I create the ConfigMap with the value of the message set to hello. Then, In the test namespace, I create the same ConfigMap but change the value to bonjour.

After I apply the pod spec in the dev namespace, it outputs hello per the ConfigMap in the same namespace. When deployed in the test namespace to see, it outputs bonjour.

ConfigMaps and a pod spec that pull values from a ConfigMap are just one way to achieve application portability in Kubernetes. This works for simple key-value pairs or more complex config files. Since these are just Kubernetes primitives, your portable application deployments can deploy in one cluster or another cluster or namespaces within the cluster and behave differently based on requirements in each environment. 

This is just a sample of what you can learn in the Kubernetes Application Configuration module. 

You can create your own customized Kubernetes course with this and many other modules using the courseware builder here on RX-M.com.

That’s the Cloud Native short take on the Kubernetes Application Configuration module.

Secret Link