Created
July 3, 2024 08:01
-
-
Save worldofprasanna/3345d30c070467b0972d1ef3c12fab30 to your computer and use it in GitHub Desktop.
Sidecar Containers introduced in Kubernetes v1.28
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: v1 | |
kind: Pod | |
metadata: | |
name: pod-with-sidecar-container | |
spec: | |
initContainers: | |
# Normal Init Container | |
- name: database-initializer | |
image: db-init:v1.34.0 | |
# Sidecar Container | |
- name: custom-logstash-forwarder | |
image: logstash:v1.20.0 | |
# This makes the Init Container as Sidecar Container | |
restartPolicy: Always | |
containers: | |
- name: main-app | |
image: my-java-app:latest | |
restartPolicy: OnFailure |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment