I have made a minimal image of a fast-api program by building its Dockerfile. The imagename is task1
. I'm trying to deploy it locally with minikube, kubectl by specifying a file named task1-deployment.yaml
with the following structure:
apiVersion: apps/v1
kind: Deployment
metadata:
name: task1-deployment
spec:
replicas: 1
selector:
matchLabels:
app: task1
template:
metadata:
labels:
app: task1
spec:
containers:
- name: task1
image: task1:latest
imagePullPolicy: Never
ports:
- containerPort: 8080
Whenever I run kubectl -f apply task1-deployment.yaml
it shows a successful message, yet when running kubectl get deployment
, task1 isn't ready and can't be accessed at localhost:8080.
The other official-pulled images work, what am I doing wrong?
Note: "imagePullPolicy" doesn't change anything