<p>I am working on a Kubernetes I deployed on my Mac using Vagrant and Vbox.
Then I installed Istio, Knative Serving, and Eventing.</p>

<p>I then defined a <code>service.yaml</code> file with the following content:</p>

<pre><code>---
apiVersion: v1
kind: Namespace
metadata:
  name: hello-k8s-ns

---
apiVersion: serving.knative.dev/v1
kind: Service
metadata:
  name: hello-k8s
  namespace: hello-k8s-ns
spec:
  template:
    spec:
      containers:
        - image: sasadangelo/hello-k8s
</code></pre>

<p>where sasadangelo/hello-k8s is a Hello World!!! docker application I built and deployed on Docker HUB. My problem is that when I try to deploy it with the <code>kubect apply</code> command, everything goes fine but no Pod is deployed. I see the service deployed but when I analyze it with <code>kubect describe</code> I see the following error message:</p>

<pre><code>Revision "hello-k8s-lm6hk" failed with message: Unable to fetch image "sasadangelo/hello-k8s": failed to resolve image to digest: failed to fetch image information: Get https://index.docker.io/v2/: dial tcp 54.72.52.58:443: connect: connection refused.
</code></pre>

<p>It's not clear to me why it cannot download the image from Docker HUB. My Vagrant VM access to the Internet correctly and the command:</p>

<pre><code>kubectl run hello-k8s --generator=run-pod/v1 --image=sasadangelo/hello-k8s:latest --port=80
</code></pre>

<p>works fine. </p>

<p>Since I am new to Knative I suspect I missing something in Knative configuration. Can anyone help?</p>

<p>According to Mario's reply, I solved configuring Docker HUB credentials.
Here the <a href="https://knative.dev/docs/serving/deploying/private-registry/" rel="nofollow noreferrer">procedure</a>.</p>

<p>I think KNative for some reason don't simply pull the image but it does some additional stuff (i.e. verify digest) that requests Docker HUB authentication.</p>

<p>According to the procedure linked, if you give the command:</p>

<pre><code>kubectl create secret mysecret ...
</code></pre>

<p>Then you need to modify the <code>service.yaml</code> in this way:</p>

<pre><code>---
apiVersion: v1
kind: Namespace
metadata:
  name: hello-k8s-ns

---
apiVersion: serving.knative.dev/v1
kind: Service
metadata:
  name: hello-k8s
  namespace: hello-k8s-ns
spec:
  template:
  spec:
    containers:
      - image: sasadangelo/hello-k8s
  imagePullSecrets:  # &lt;--------------- Add this line
    - name: docker-hub-registry # &lt;---- Add this line
</code></pre>
