During this tutorial you'll learn how to manage environment variables on Kubernetes.
- Level: beginner
- Requirements: none
- Previous Tutorials: deployments
- Can run on Cluster: any
- Can run on Namespace: any
- Images used:
Environment variables is one of the ways to configure the workload instances.
- Env: [
We'll run a user image
jmalloc/echo-server:0.1.0 which listens to a configurable port and replies on requests. The code is located here and the configuration sections tells us the following:
Configuration * The PORT environment variable sets the server port, which defaults to 8080
We'll deploy the image and configure a different
PORT environment variable, e.g.
9999. We check the logs and see the instance is listening to the configured port.
Remember to delete the following resources after you finish this tutorial:
- on active namespace: