<p><strong>Bug description</strong></p>
<p>Installation gets timeout errors and in <code>kubectl get pods -n istio-system</code> shows <code>ImagePullBackOff</code>.</p>
<p><code>kubectl describe pod istiod-xxx-xxx -n istio-system</code></p>
<blockquote>
<p>Failed to pull image &quot;our-registry:5000/pilot:1.10.3&quot;: rpc error: code = Unknown desc = Error response from daemon: Head https://our-registry:5000/v2/pilot/manifests/1.10.3: no basic auth credentials</p>
</blockquote>
<p><strong>Affected product area (please put an X in all that apply)</strong></p>
<p>[x] Installation</p>
<p><strong>Expected behavior</strong></p>
<p>Successful installation with <code>istioctl install --set profile=demo --set hub=our-registry:5000</code></p>
<p><strong>Steps to reproduce the bug</strong></p>
<ul>
<li><p>Create <code>istio-system</code> namespace.</p>
</li>
<li><p>Set <code>docker-registry</code> user credentials for <code>istio-system</code> namespace.</p>
</li>
<li><p><code>istioctl manifest generate --set profile=demo --set hub=our-registry:5000 &gt; new-generated-manifest.yaml</code></p>
</li>
<li><p>Verify it has proper images with <code>our-registry:5000</code></p>
</li>
<li><p>Pull and push required images to <code>our-registry:5000</code></p>
</li>
<li><p><code>istioctl install --set profile=demo --set hub=our-registry:5000</code></p>
</li>
</ul>
<p><strong>Version</strong></p>
<p>Kubernetes : v1.21</p>
<p>Istio : 1.10.3 / 1.7.3</p>
<p><strong>How was Istio installed?</strong></p>
<p><code>istioctl install --set profile=demo --set hub=our-registry:5000</code></p>
<p>[References]</p>
<ol>
<li>Tried to setup imagePullSecrets as described <a href="https://stackoverflow.com/questions/63721552/install-istio-by-using-istioctl-from-private-registry">here</a>, but it gives</li>
</ol>
<blockquote>
<p>Json object error
2. <a href="https://github.com/istio/istio/issues/27036" rel="nofollow noreferrer">Here</a> describe about using it in charts, but dont know how they applied it.</p>
</blockquote>
<p>Originally posted as an <a href="https://github.com/istio/istio/issues/34636" rel="nofollow noreferrer">issue</a>.</p>

<p>There are two ways to cirumvent this issue.</p>
<h3>If installing with <code>istioctl install</code></h3>
<p>Using <code>istioctl install</code> provide a <a href="https://kubernetes.io/docs/concepts/configuration/secret/" rel="nofollow noreferrer">secret</a> with docker-registry auth details with <code>--set values.global.imagePullSecrets</code>. Like this</p>
<pre class="lang-text prettyprint-override"><code>istioctl install [other options] --set values.global.imagePullSecrets[0]=&lt;auth-secret&gt;
</code></pre>
<p>Where <code>&lt;auth-secret&gt;</code> is the secret created prior on the cluster.<br />
You can read more about using secrets with docker repository <a href="https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/" rel="nofollow noreferrer">here</a></p>
<h3>If installing using Istio operator</h3>
<p>Installing Istio with operator, from private regostry, you have to pass proper YAML:</p>
<pre class="lang-yaml prettyprint-override"><code>apiVersion: install.istio.io/v1alpha1
kind: IstioOperator
...
spec:
  profile: demo #as an example
  values:
    global:
      imagePullSecrets:
      - &lt;auth-secret&gt;
...
</code></pre>
<p>Again, <code>&lt;auth-secret&gt;</code> must be created prior.</p>
