<p>I am trying to start up a couple of containers locally using k8s but container creation is stopped cause of <strong>ImagePullBackOff</strong>, <strong>ErrImagePull</strong>.
The yaml is fine, tested it on another workstation. And i can pull images using regular docker. But it fails in k8s/minikube environment</p>
<p>Error container logs is</p>
<pre><code>Error from server (BadRequest): container &quot;mongo-express&quot; in pod &quot;mongoexpress-deployment-bd7cf697b-nc4h5&quot; is waiting to start: trying and failing to pull image
</code></pre>
<p>Error in minikube dashboard is</p>
<pre><code>Failed to pull image &quot;docker.io/mongo&quot;: rpc error: code = Unknown desc = Error response from daemon: Get &quot;https://registry-1.docker.io/v2/&quot;: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers) 
</code></pre>
<p>I tried pulling the image to my local docker cache and running</p>
<pre><code>eval $(minikube docker-env)
</code></pre>
<p>But i keep getting this error. It doesnt see local image repository and it doesnt dowload the image by itself.</p>
<p>I am 100% sure it has something to do with user access on Fedora. But dont have any idea what to do, and i've been trying to fix this for a couple of days :(.</p>
<p>Please help, thank you</p>
<p>Dont know if this helps: I tried using <a href="https://k3s.io/" rel="nofollow noreferrer">k3s</a>. Image pull is successful, but minikube isnt compatible with it on Fedora.</p>
<p>Also... If i try using docker without sudo it doesnt pull images. With sudo it pulls.</p>
<p>OS is Fedora, and i am using docker, kubernetes, minikube, podman as driver.</p>
<pre><code>- linux version
NAME=&quot;Fedora Linux&quot;
VERSION=&quot;35 (Workstation Edition)&quot;
- kubectl version
Client Version: version.Info{Major:&quot;1&quot;, Minor:&quot;23&quot;, GitVersion:&quot;v1.23.5&quot;, 
- docker version
Version:          20.10.12
- minikube version
minikube version: v1.25.2

</code></pre>
<p>I am trying to start up locally this yaml file</p>
<pre><code>apiVersion: v1
kind: Secret
metadata:
  name: mongodb-secret
type: Opaque
data:
  mongo-root-username: dXNlcm5hbWU=
  mongo-root-password: cGFzc3dvcmQ=
---
apiVersion: v1
kind: ConfigMap
metadata:
  name: mongodb-configmap
data:
  database_url: mongodb-service
---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: mongoexpress-deployment
  labels:
    app: mongoexpress
spec:
  replicas: 1
  selector:
    matchLabels:
      app: mongoexpress
  template:
    metadata:
      labels:
        app: mongoexpress
    spec:
      containers:
        - name: mongo-express
          image: mongo-express
          ports:
            - containerPort: 8081
          env:
            - name: ME_CONFIG_MONGODB_ADMINUSERNAME
              valueFrom:
                secretKeyRef:
                  name: mongodb-secret
                  key: mongo-root-username
            - name: ME_CONFIG_MONGODB_ADMINPASSWORD
              valueFrom:
                secretKeyRef:
                  name: mongodb-secret
                  key: mongo-root-password
            - name: ME_CONFIG_MONGODB_SERVER
              valueFrom:
                configMapKeyRef:
                  name: mongodb-configmap
                  key: database_url
            - name: WHATEVER
              value: Someconfig
---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: mongodb-deployment
  labels:
    app: mongodb
spec:
  replicas: 1
  selector:
    matchLabels:
      app: mongodb
  template:
    metadata:
      labels:
        app: mongodb
    spec:
      containers:
        - name: mongodb
          image: mongo
          ports:
            - containerPort: 27017
          env:
            - name: MONGO_INITDB_ROOT_USERNAME
              valueFrom:
                  secretKeyRef:
                    name: mongodb-secret
                    key: mongo-root-username
            - name: MONGO_INITDB_ROOT_PASSWORD
              valueFrom:
                  secretKeyRef:
                    name: mongodb-secret
                    key: mongo-root-password
---
apiVersion: v1
kind: Service
metadata:
  name: mongodb-service
spec:
  selector:
    app: mongodb
  ports:
    - protocol: TCP
      port: 27017
      targetPort: 27017
---
apiVersion: v1
kind: Service
metadata:
  name: mongoexpress-service
spec:
  selector:
    app: mongoexpress-deployment
  type: LoadBalancer
  ports:
    - protocol: TCP
      port: 8081
      targetPort: 8081
      nodePort: 30000
</code></pre>

<p>Based on the comments, my suggestion is to use the docker driver, since Docker has been installed in the system and is the <a href="https://minikube.sigs.k8s.io/docs/drivers/" rel="nofollow noreferrer">preferred stable driver</a>.</p>
<pre class="lang-sh prettyprint-override"><code>minikube start --driver=docker
</code></pre>
<p>You can also set this as the default driver.</p>
<pre class="lang-sh prettyprint-override"><code>minikube config set driver docker
minikube start
</code></pre>
<p>That doesn't explain why it doesn't work with podman, though.</p>
