Differences between revisions 3 and 4
Revision 3 as of 2021-10-21 06:04:58
Size: 1163
Editor: PieterSmit
Comment:
Revision 4 as of 2021-10-21 08:42:22
Size: 1500
Editor: PieterSmit
Comment:
Deletions are marked like this. Additions are marked like this.
Line 33: Line 33:
      ...
      envFrom:
        - configMapRef:
             name: app-conf-map
      ...
      env:
        - name: APP_COLOR1
          value: pink

        - name: App_COLOR2
          valueFrom:
               configMapKeyRef:

        - name: App_PWD
          valueFrom:
               secretKeyRef:

      

k8s Pods

  • PODs
    • smallest object in k8s, contains containers, can contain one or more containers
    • scale service by creating more pod instances.
    • additional container could be helper container.
    • network space is shared between containers in the same pod, they can communicate on localhost.
  • Static Pods
    • On standalone VM, the kubelet can be configured to

      • read pod definitions from
        1. (Option:--pod-manifest-path=/etc/kubernetes/manifests).

          •  ps ax | grep kubeconfig 

        2. kubeconfig.yaml staticPodPath: /etc/kubernetes/manifest.
      • It also assures they stay alive.
      • Only POD's , nothing else.
      • view with  docker ps 

      • the kubeadm k8s setup uses static pods to run the k8s management software as pods on nodes.
    • Static Pods and DaemonSets are ignored by the Kube-Scheduler

  • Pod, eq in Docker ENTRYPOINT->command & CMD->args

    apiVersion: v1
    kind: Pod
    metadata:
      name: ubuntu-sleeper-pod
    spec:
      containers:
        - name: ubuntu-sleeper
          image: ubuntu-sleeper
          command: ["sleep2.0"]
          args: ["10",]
          ...
          envFrom:
            - configMapRef:
                 name: app-conf-map
          ...
          env:
            - name: APP_COLOR1
              value: pink
    
            - name: App_COLOR2
              valueFrom:
                   configMapKeyRef:
    
            - name: App_PWD
              valueFrom:
                   secretKeyRef:    

}}}

k8s/StudyNotes/Pods (last edited 2021-10-21 19:22:20 by PieterSmit)