45 - CKA exam Q45 with Solution... insert a sidecar container in a running pod

  Рет қаралды 5,187

Infotech With Guru — In time IT insights

Infotech With Guru — In time IT insights

Жыл бұрын

Пікірлер: 13
@shashikantdivekar7839
@shashikantdivekar7839 Жыл бұрын
Thank you Sir for this video. You explained it well and it's very useful.
@mohiniupasani1909
@mohiniupasani1909 Жыл бұрын
thank you , one small suggestion you can use set paste option in vi for better indentation
@pankaj7121
@pankaj7121 8 ай бұрын
But if they have specified not to delete existing pod , how can you do it.
@EyeSetsfineZetworks
@EyeSetsfineZetworks 8 ай бұрын
I think you can do whatever makes sense, end goal is important
@2mailram
@2mailram Жыл бұрын
side car container and multi container are both are same ?
@EyeSetsfineZetworks
@EyeSetsfineZetworks Жыл бұрын
It's not the same; the sidecar has a dedicated purpose with the main.
@2mailram
@2mailram Жыл бұрын
@@EyeSetsfineZetworks I understand the concept, but looks like templates are similar am i correct? #Edit multipod.yaml like below: ######## apiVersion: v1 kind: Pod metadata: labels: run: pod-multi name: pod-multi spec: containers: - image: nginx name: container1 - image: busybox name: container2 command: ["sleep","4800"] ============================== example for sidecar template. ============================== apiVersion: v1 kind: Pod metadata: name: sidecar-container-demo spec: containers: - image: busybox command: ["/bin/sh"] args: ["-c", "while true; do echo echo $(date -u) 'Hi I am from Sidecar container' >> /var/log/index.html; sleep 5;done"] name: sidecar-container resources: {} volumeMounts: - name: var-logs mountPath: /var/log - image: nginx name: main-container resources: {} ports: - containerPort: 80 volumeMounts: - name: var-logs mountPath: /usr/share/nginx/html dnsPolicy: Default volumes: - name: var-logs emptyDir: {}
@sahanmax1
@sahanmax1 11 ай бұрын
@@2mailram Sidecar containers are the containers that should run along with the main container in the pod. like log collector Multi-container Pod is to support co-located, co-managed helper processes for a primary application. both are using same network namespace and shared volumes. Additionally, Yaml templates will be somewhat similar.
@EyeSetsfineZetworks
@EyeSetsfineZetworks Жыл бұрын
--------example-pod.yaml------------------- apiVersion: v1 kind: Pod metadata: name: example-pod spec: containers: - image: nginx name: main-container resources: {} ports: - containerPort: 80 volumeMounts: - name: var-logs mountPath: /usr/share/nginx/html dnsPolicy: Default volumes: - name: var-logs emptyDir: {} ------- Sidecar Container info--------- - image: busybox command: ["/bin/sh"] args: ["-c", "while true; do echo echo $(date -u) 'Hi I am from Sidec container' >> /var/log/index.html; sleep 5;done"] name: sidec-container volumeMounts: - name: var-logs mountPath: /var/log
@EyeSetsfineZetworks
@EyeSetsfineZetworks Жыл бұрын
@@sivap2936, what is the exact ask.. can you pls provide it in detail?
@EyeSetsfineZetworks
@EyeSetsfineZetworks Жыл бұрын
@@sivap2936 check Q 15 - Expose a pod by creating a service on port 30002
@sivap2936
@sivap2936 Жыл бұрын
apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: minimal-ingress namespace: (provided namespace) annotations: nginx.ingress.kubernetes.io/rewrite-target: / spec: rules: - http: paths: - path: /testpath pathType: Prefix backend: service: name: test port: number: 80
@sivap2936
@sivap2936 Жыл бұрын
apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: minimal-ingress namespace: (provided namespace) annotations: nginx.ingress.kubernetes.io/rewrite-target: / spec: rules: - http: paths: - path: /testpath pathType: Prefix backend: service: name: test port: number: 80
13 - CKA exam Q13 with Solution .. Run a jsonpath query
3:37
Infotech With Guru — In time IT insights
Рет қаралды 1,7 М.
УГАДАЙ ГДЕ ПРАВИЛЬНЫЙ ЦВЕТ?😱
00:14
МЯТНАЯ ФАНТА
Рет қаралды 3,6 МЛН
init containers and side-car containers in kubernetes
22:10
Deekshith SN
Рет қаралды 25 М.
CKA Exam || Storage question in CKA
14:03
anishrana2001
Рет қаралды 1,3 М.
28 - CKA exam Q28 with Solution... Kubernetes Network Policy explained
12:20
Infotech With Guru — In time IT insights
Рет қаралды 3 М.
УГАДАЙ ГДЕ ПРАВИЛЬНЫЙ ЦВЕТ?😱
00:14
МЯТНАЯ ФАНТА
Рет қаралды 3,6 МЛН