Hello World

Be Happy!

infinite pod is waiting to start: ContainerCreating


% kubectl get pod   
NAME                                  READY   STATUS              RESTARTS   AGE
db                                    1/1     Running             0          20h
redis                                 1/1     Running             0          20h
sidekiq-deployment-6c546d788c-72nr5   0/1     ContainerCreating   0          117s
sidekiq-deployment-6c546d788c-84rgv   1/1     Running             0          117s
web                                   1/1     Running             0          20h
 
% kubectl logs sidekiq-deployment-6c546d788c-72nr5
Error from server (BadRequest): container "sidekiq" in pod "sidekiq-deployment-6c546d788c-72nr5" is waiting to start: ContainerCreating

Solution

Added emptyDir: {} in volumes:
apiVersion: apps/v1
kind: Deployment
metadata:
  name: sidekiq-deployment
  labels:
    app: sidekiq
spec:
  replicas: 2
  selector:
    matchLabels:
      app: sidekiq
  template:
    metadata:
      labels:
        app: sidekiq
    spec:
      containers:
        - name: sidekiq
          image: 085691210228.dkr.ecr.us-west-1.amazonaws.com/cw-ovp
          args:
            - bundle
            - exec
            - sidekiq
            - -c
            - "2"
          volumeMounts:
            - mountPath: /storage
              name: local-storage
      volumes:
        - name: local-storage
          emptyDir: {}
#kubectl (6) #k8s-troubleshooting (2) #k8s (10)
List