DevOps Classroom notes 13/Feb/2025

Pods contd..

  • Pods will have 4 types of containers in it
    • containers: These are main containers where the applications run
    • sidecar container: These are contianers which add additional functionality such as agents (log, monitoring etc) to the application Refer Here
    • init-container: These containers are created in a sequential order before the main containers. These containers are used to do configuration. init containers are supposed to be running for a finite time. Main containers are created after init containers have finished executing
    • ephmeral containers: they are present for debugging purposes & are not part of Pod lifecycle, we inject this container with kubectl debug command
  • Watch classroom video for pod creation order
apiVersion: v1
kind: Pod
metadata:
  name: httpd-pod
spec:
  containers:
    - name: httpd
      image: httpd:latest
    - name: sidecar
      image: alpine
      args:
        - sleep
        - 1d
  initContainers:
    - name: test1
      image: alpine
      args:
        - sleep
        - 20s
    - name: test2
      image: alpine
      args:
        - sleep
        - 20s

Preview

  • Kubernetes Pod Lifecycle
  • For Kubernetes Pod the desired state is to ensure the containers in Pod are in running state. For any reason if the contianer gets into exited state, Pod will retry restarts continuously. This state is referred as CrashLoopBackOff

Published
Categorized as Uncategorized Tagged

By continuous learner

devops & cloud enthusiastic learner

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Please turn AdBlock off
Animated Social Media Icons by Acurax Responsive Web Designing Company

Discover more from Direct DevOps from Quality Thought

Subscribe now to keep reading and get access to the full archive.

Continue reading

Visit Us On FacebookVisit Us On LinkedinVisit Us On Youtube