What this pattern does:

Many applications rely on configuration which is used during either application initialization or runtime. Most times, there is a requirement to adjust values assigned to configuration parameters. ConfigMaps are a Kubernetes mechanism that let you inject configuration data into application pods. The ConfigMap concept allow you to decouple configuration artifacts from image content to keep containerized applications portable. For example, you can download and run the same container image to spin up containers for the purposes of local development, system test, or running a live end-user workload. This design provides a usage example demonstrating how to create ConfigMaps and configure Pods using data stored in ConfigMaps.

Caveats and Consideration:

In essence, this configuration creates a Deployment that: Runs 3 replicas of a pod. Each pod uses the alpine:3 image. Inside each pod, a script continuously prints the current date and a message with a preferred sport fetched from a ConfigMap named "sport". The ConfigMap provides the "sport" data that's mounted into the container's file system. This example demonstrates how to use ConfigMaps to inject configuration data into your pods, allowing you to decouple configuration from your application's image.

Compatibility:



Recent Discussions with "meshery" Tag