<p>Im trying to follow the get started docker's tutorials, but I get stuck when you have to work with kuberetes. I'm using microk8s to create the clusters.</p>

<p>My Dockerfile:</p>

<pre><code>FROM node:6.11.5WORKDIR /usr/src/app
COPY package.json .
RUN npm install
COPY . .

CMD [ "npm", "start" ]
</code></pre>

<p>My bb.yaml:</p>

<pre><code>apiVersion: apps/v1
kind: Deployment
metadata:
  name: bb-demo
  namespace: default
spec:
  replicas: 1
  selector:
    matchLabels:
      bb: web
  template:
    metadata:
      labels:
        bb: web
    spec:
      containers:
      - name: bb-site
        image: bulletinboard:1.0
---
apiVersion: v1
kind: Service
metadata:
  name: bb-entrypoint
  namespace: default
spec:
  type: NodePort
  selector:
    bb: web
  ports:
  - port: 8080
    targetPort: 8080
    nodePort: 30001
</code></pre>

<p>I create the image with </p>

<pre><code>docker image build -t bulletinboard:1.0 .
</code></pre>

<p>And I create the pod and the service with:</p>

<pre><code>microk8s.kubectl apply -f bb.yaml
</code></pre>

<p>The pod is created, but, when I look for the state of my pods with </p>

<pre><code>microk8s.kubectl get all
</code></pre>

<p>It says:</p>

<pre><code>NAME                           READY   STATUS             RESTARTS   AGE
pod/bb-demo-7ffb568776-6njfg   0/1     ImagePullBackOff   0          11m

NAME                    TYPE        CLUSTER-IP     EXTERNAL-IP   PORT(S)          AGE
service/bb-entrypoint   NodePort    10.152.183.2   &lt;none&gt;        8080:30001/TCP   11m
service/kubernetes      ClusterIP   10.152.183.1   &lt;none&gt;        443/TCP          4d

NAME                      READY   UP-TO-DATE   AVAILABLE   AGE
deployment.apps/bb-demo   0/1     1            0           11m

NAME                                 DESIRED   CURRENT   READY   AGE
replicaset.apps/bb-demo-7ffb568776   1         1         0       11m
</code></pre>

<p>Also, when I look for it at the kubernetes dashboard it says:</p>

<p>Failed to pull image "bulletinboard:1.0": rpc error: code = Unknown desc = failed to resolve image "docker.io/library/bulletinboard:1.0": no available registry endpoint: pull access denied, repository does not exist or may require authorization: server message: insufficient_scope: authorization failed </p>

<p><strong>Q: Why do I get this error? Im just following the tutorial without skipping anything.</strong></p>

<p>Im already logged with docker.</p>

Manu Ruiz Ruiz
<p>You need to push this locally built image to the Docker Hub registry. For that, you need to create a Docker Hub account if you do not have one already. </p>

<p>Once you do that, you need to login to Docker Hub from your command line. </p>

<p><code>docker login</code> </p>

<p>Tag your image so it goes to your Docker Hub repository. </p>

<p><code>docker tag bulletinboard:1.0 &lt;your docker hub user&gt;/bulletinboard:1.0</code> </p>

<p>Push your image to Docker Hub </p>

<p><code>docker push &lt;your docker hub user&gt;/bulletinboard:1.0</code></p>

<p>Update the yaml file to reflect the new image repo on Docker Hub. </p>

<p><code>spec:
      containers:
      - name: bb-site
        image: &lt;your docker hub user&gt;/bulletinboard:1.0</code></p>

<p>re-apply the yaml file </p>

<p><code>microk8s.kubectl apply -f bb.yaml</code></p>
