Skip to content
This repository has been archived by the owner on Jun 12, 2024. It is now read-only.

No pod created after successful draft up #947

Open
markgarrigan opened this issue Oct 10, 2019 · 1 comment
Open

No pod created after successful draft up #947

markgarrigan opened this issue Oct 10, 2019 · 1 comment

Comments

@markgarrigan
Copy link

I'm not really sure where to start troubleshooting this. Everything seems to work great except there are no pods created after a draft up.

$ draft up
WARNING: no registry has been set, therefore Draft will not push to a container registry. This can be fixed by running `draft config set registry docker.io/myusername`
Hint: this warning can be disabled by running `draft config set disable-push-warning 1`
Draft Up Started: 'example-nodejs': 01DPVKFTT69D4MVFR3R998Q1C0
example-nodejs: Building Docker Image: SUCCESS ⚓  (1.0002s)
example-nodejs: Releasing Application: SUCCESS ⚓  (2.0919s)
Inspect the logs with `draft logs 01DPVKFTT69D4MVFR3R998Q1C0`
$ kubectl get pods
No resources found.
$ kubectl cluster-info
Kubernetes master is running at https://kubernetes.docker.internal:6443
KubeDNS is running at https://kubernetes.docker.internal:6443/api/v1/namespaces/kube-system/services/kube-dns:dns/proxy
$ draft logs 01DPVKFTT69D4MVFR3R998Q1C0
Step 1/9 : FROM node:10
 ---> 636ef87129d6
Step 2/9 : ENV PORT 8080
 ---> Using cache
 ---> f500e017d9bf
Step 3/9 : EXPOSE 8080
 ---> Using cache
 ---> a9778da2688e
Step 4/9 : RUN mkdir -p /usr/src/app
 ---> Using cache
 ---> db6086346864
Step 5/9 : WORKDIR /usr/src/app
 ---> Using cache
 ---> 7b20ca6e653c
Step 6/9 : COPY package.json .
 ---> Using cache
 ---> 19c4c31a36bd
Step 7/9 : RUN npm install
 ---> Using cache
 ---> a05150a4123d
Step 8/9 : COPY . .
 ---> Using cache
 ---> 1ab8ec9ad0a3
Step 9/9 : CMD ["npm", "start"]
 ---> Using cache
 ---> 4ca90cdae875
Successfully built 4ca90cdae875
Successfully tagged example-nodejs:edb6c96293bf835b42a2f0a265c08e930b0491f9
@markgarrigan
Copy link
Author

Ok sort of disregard all of that. Here's what happened.

Out of the box Docker for Mac with Kubernetes enabled creates the docker-desktop cluster. It also creates two contexts...

CURRENT   NAME                 CLUSTER             AUTHINFO         NAMESPACE
*         docker-desktop       docker-desktop      docker-desktop   markbox
          docker-for-desktop   docker-desktop      docker-desktop

When running the draft up command my current context was docker-desktop. Then I did kubectl get pods in the docker-desktop context. I switched to the docker-for-desktop context...

Switched to context "docker-for-desktop".
$ kubectl get pods
NAME                                            READY   STATUS    RESTARTS   AGE
example-nodejs-example-nodejs-fcd7489f4-2znhb   1/1     Running   0          10m

Is this just a lack of kubernetes understanding on my part or did something go wrong? I would have thought that the pod would be created in my current context.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants