Search code examples
bashkubernetesexec

how to update configuration for one of the configuration file inside POD file systems


I am able to exec to a POD and inside POD one of the configuration I need to update highlighted below, how I can update this,

Like I need to change port from 8080 to 8090

enter image description here


Solution

  • A couple of things should be understood first... Do you use a Helm Chart? If yes, try to see if inside the values.yaml it's possible to change that parameter.

    If not, create a ConfigMap with the values ​​you want, in this case you can simply copy the configuration you find in the Pod and bring it back with the correct parameters.

    Then mount the ConfigMap in the path where the original file is.

    This will overwrite the old file with your correct ConfigMap.

    Check it out here: https://kubernetes.io/docs/tasks/configure-pod-container/configure-pod-configmap/