<p>I am using <code>minikube</code> and <code>kubectl</code> to create an <code>RC</code> for <code>mongo</code>. And I am using the company's VPN.</p>
<p>Created the <code>RC</code> via <code>kubectl create -f ./rc/mongo-rc.yaml</code> command.</p>
<p>Got below kubernetes events when using <code>kubectl describe pod mongo-5zttk</code> command:</p>
<pre class="lang-sh prettyprint-override"><code>...
Events:
  Type     Reason     Age                    From               Message
  ----     ------     ----                   ----               -------
  Normal   Scheduled  7m18s                  default-scheduler  Successfully assigned default/mongo-5zttk to minikube
  Normal   Pulling    5m42s (x4 over 7m17s)  kubelet, minikube  Pulling image &quot;mongo&quot;
  Warning  Failed     5m40s (x4 over 7m15s)  kubelet, minikube  Failed to pull image &quot;mongo&quot;: rpc error: code = Unknown desc = Error response from daemon: Get https://registry-1.docker.io/v2/library/mongo/manifests/latest: Get https://auth.docker.io/token?scope=repository%3Alibrary%2Fmongo%3Apull&amp;service=registry.docker.io: x509: certificate signed by unknown authority
  Warning  Failed     5m40s (x4 over 7m15s)  kubelet, minikube  Error: ErrImagePull
  Normal   BackOff    5m29s (x6 over 7m15s)  kubelet, minikube  Back-off pulling image &quot;mongo&quot;
  Warning  Failed     2m8s (x21 over 7m15s)  kubelet, minikube  Error: ImagePullBackOff
</code></pre>
<p>When I try to use <code>curl</code> to access the URL:</p>
<pre class="lang-sh prettyprint-override"><code>⚡  curl https://registry-1.docker.io/v2/library/mongo/manifests/latest
{&quot;errors&quot;:[{&quot;code&quot;:&quot;UNAUTHORIZED&quot;,&quot;message&quot;:&quot;authentication required&quot;,&quot;detail&quot;:[{&quot;Type&quot;:&quot;repository&quot;,&quot;Class&quot;:&quot;&quot;,&quot;Name&quot;:&quot;library/mongo&quot;,&quot;Action&quot;:&quot;pull&quot;}]}]}
</code></pre>
<p>I can pull the <code>mongo:latest</code> image from the docker hub registry successfully.</p>
<pre class="lang-sh prettyprint-override"><code>⚡  docker pull mongo:latest
latest: Pulling from library/mongo
Digest: sha256:efc408845bc917d0b7fd97a8590e9c8d3c314f58cee651bd3030c9cf2ce9032d
Status: Image is up to date for mongo:latest
docker.io/library/mongo:latest
</code></pre>
<p>Environment information:</p>
<ul>
<li>minikube version: v1.14.1</li>
<li>kubectl
<ul>
<li>Client Version: v1.18.8</li>
<li>Server Version: v1.19.2</li>
</ul>
</li>
<li>OS: macOS 10.13.6</li>
</ul>
<p>I have read the doc: <a href="https://minikube.sigs.k8s.io/docs/handbook/vpn_and_proxy/#x509-certificate-signed-by-unknown-authority" rel="nofollow noreferrer">vpn_and_proxy/#x509-certificate-signed-by-unknown-authority</a>. The solution is to ask the IT department for the appropriate PEM file. Is there any solution if I can't get the PEM file? Such as use some command flag: <code>--skip-verify-cert</code>?</p>
<p><strong>UPDATE:</strong></p>
<p><code>mongo-rc.yaml</code>:</p>
<pre class="lang-yaml prettyprint-override"><code>apiVersion: v1
kind: ReplicationController
metadata: 
  name: mongo
spec: 
  replicas: 1
  selector: 
    app: mongo
  template: 
    metadata: 
      labels:
        app: mongo
    spec: 
      containers: 
      - name: mongo
        image: mongo
        ports: 
        - containerPort: 27017
        env: 
        - name: MONGO_ROOT_PASSWORD
          value: &quot;123456&quot;
</code></pre>

Lin Du
<p>You should be able to use the <code>--insecure-registry</code> flag, but you might have to recreate your minikube cluster for it to work.</p>
<pre><code>minikube start --insecure-registry=&quot;registry-1.docker.io&quot;
</code></pre>
