MiniKube pod keeps crashing CrashBackLoopOff

Viewed 35

Im working on a microservice using minikube and docker. I have 4 Yaml files a dockerfile and one server.py. I keep getting a CrashBackOffLoop on K9s everytime. The files all configured fine. I also get an error saying server.py does not exist through minikube.

auth-deploy.yaml

apiVersion: app/v1
kind: Deployment
metadata:
  name: auth
  labels:
    app: auth
spec:
  replicas: 2
  selector:
    matchLabels:
      app: auth
  strategy:
    type: RollingUpdate
    rollingUpdate:
      maxSurge: 3
  template:
    metadata:
      labels:
        app: auth
    spec:
      containers:
        - name: auth
          image: hiconnor/auth
          ports:
            - containerPort: 5005
          envFrom:
            - configMapRef:
                name: auth-configmap
            - secretRef:
                name: auth-secret

confi-map.yaml

apiVersion: v1
kind: ConfigMap
metadata:
  name: auth-configmap
data:
  MYSQL_HOST: host.minikube.internal
  MYSQL_USER: auth_user
  MYSQL_DB: auth
  MYSQL_PORT: "3306"

[Dockerfile][3]

FROM python:3.10-slim-bullseye

RUN apt-get update \
  && apt-get install -y --no-install-recommends --no-install-suggests \
  build-essential default-libmysqlclient-dev \
  && pip install --no-cache-dir --upgrade pip

WORKDIR /app
COPY ./requirements.txt /app
RUN pip install --no-cache-dir --requirement /app/requirements.txt
COPY . /app

EXPOSE 5005

CMD ["python3", "server.py"]

[k9s]

1

[error in minikube]

Stream closed EOF for default/auth-5789f7564c-frbhh (auth)

2

0 Answers
Related