Vert.X can read the override configuration directly from an environment variable. In this case, the environment variable is defaulted to greeting. You can specify the environmental variable directly using the oc command:
[vagrant@rhel-cdk kubernetes]$ oc env dc/helloworld-service-vertx GREETING='Hello {name} from envvar!'
deploymentconfig "helloworld-service-vertx" updated
Again, through the use of DeploymentCofig, it’ll rolling update all the replicas with the new configuration! If you were to refresh the application, you’ll notice that there are no intermittent errors because we also have health checks and readiness checks in place.
Check the application to see it is using the new Greeting string.
Let’s remove the defined variable:
[vagrant@rhel-cdk kubernetes]$ oc env dc/helloworld-service-vertx GREETING-
deploymentconfig "helloworld-service-vertx" updated
Note
|
The '-' means that we want to remove that environment var from the DeploymentConfig. |