What kind of patterns exist for multi-container pods in Kubernetes?
What are reasons for multi-container pods and what are consequences for the included containers?
How do we create multi-container pods?
What is a good example of a Sidecar patternß
What is an example for the Adapter pattern?
What is an example for the Ambassador pattern?
With what command can we see the logs of a running application/pod?
kubectl logs app-name -n namespace
What happens if any one container in one pod fail?
What is initContainers used for?
How do we configure a initContainer ?
in pod yaml:
spec: containers: - name: initContainers: - name: init-myservice image: busybox command: ['sh', '-c', 'git clone < some repo that will be used by the application;']
How does the initContainer work?
Are multiple initContainers possible? What about sequence and failure?
Yes
- each initContainer is then run one at a time in a sequential order
- if any of the initContainer fails to complete, pod is restarted until it succeeds