Whenever I create a pod the status of pod changes to 'CrashLoopBackOff' after 'Completed'. I am using microk8s I have pushed the image to microk8s registry. I am creating a pod by running this command : "kubectl create -f backend-deployment.yml"
backend.Dockerfile( this docker file is of Django):
From python:3
ENV PYTHONUNBUFFERED 1
WORKDIR /code
COPY requirements.txt /code/
RUN pip install -r requirements.txt
COPY . ./
EXPOSE 8000
backend-deployment.yml
apiVersion: apps/v1
kind: Deployment
metadata:
name : backend-deployment
spec:
replicas: 1
selector:
matchLabels:
component: backend
template:
metadata:
labels:
component: backend
spec:
containers:
- name: backand
image: localhost:32000/backend:latest
ports:
- containerPort: 8000
what am I doing wrong?