I recently ran into a scenario wherein I had to add port in a deploymentConfig(DC) file having multiple containers. “oc edit” is a quite handy command but it will open an editor thereby not useful when automating the updation. Let us take a look at the DC file and apply “oc patch” command on it to update certain fields.
- name: my-first-image
- containerPort: 8080