<p>I am using Minikube to setup a k8s environment for later production but I can't figure out how to pull private container from Docker Hub in my service definition.</p>

<p>I added </p>

<pre><code>imagePullSecrets:
    - name: dockerregistrykey
</code></pre>

<p>to the service definition <code>spec.template.spec</code> and the <code>dockerregistrykey</code> to the secrets.</p>

<p>But I am still getting this error</p>

<pre><code>Failed to pull image "keyshake/transaction_service:latest": rpc error: code = Unknown desc = Error response from daemon: pull access denied for keyshake/transaction_service, repository does not exist or may require 'docker login'
</code></pre>

<p>Thanks in advance.</p>

<p>You need to declare the use of the pullSecret at container level:</p>

<pre><code>...
spec:
  containers:
    - name: my_container
      image: your_image
  imagePullSecrets:
    - name: dockerregistrykey
</code></pre>
