Before the main application containers start, one might need to apply specific network rules or configurations. An Init Container can be used to apply these configurations. The network-config Init Container runs an image containing a script called setup-network.sh. Add the command necessary for running the script.
apiVersion: v1
kind: Pod
metadata:
name: app-pod
spec:
initContainers:
- name: network-config
image: network-config-image:latest
Copy the manifest and complete it by adding a single line with the key and the value separated by a :.