I am having issue with PVC implementation with my django nginx app deployment contains 4 replicas.
while running --> kubectl apply -f deployment.yaml
output: --> service/hello-python-service created
But when i see pods status. I am getting “ContainerCreating” for 2 pods and rest 2 pods are “Running”.
My question is why is this behavior of 2 pods “Running” and 2 pods are with “ContainerCreating” status.
And also how can I make it full fledged working with PVC implementation.
code of deployment.yaml–>
matchLabels: app: hello-python
metadata: labels: app: hello-python spec: containers: - name: hello-python image: gcr.io/kubernetes-application-2311/baseproject:v1 command: ["python", "./manage.py", "runserver", "0.0.0.0:8000"] imagePullPolicy: Always ports: - containerPort: 8000 volumeMounts: - mountPath: /storage/data-1 name: storage volumes: - name: storage persistentVolumeClaim: claimName: pv-claim
requests: storage: 5Gi