I'm trying to follow instructions on this guide but under docker.
I set up a folder with:
.
├── Dockerfile
└── main.py
0 directories, 2 files
main.py is:
#!/usr/bin/env python3
print("Docker is magic!")
Dockerfile is:
FROM python:latest
COPY main.py /
CMD [ "python", "./main.py" ]
FROM python:3.7-alpine
COPY ./ /usr/src/app/
WORKDIR /usr/src/app
RUN apk add curl openssl bash --no-cache
RUN curl -LO "https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl" \
&& chmod +x ./kubectl \
&& mv ./kubectl /usr/local/bin/kubectl
kubectl create deployment hello-node --image=k8s.gcr.io/echoserver:1.4
kubectl expose deployment hello-node --type=LoadBalancer --port=38080
minikube start --driver=docker
kubectl get pods
When I run docker run python-test I see in terminal:
Docker is magic!
but I don't see the get pods output.
My goal here is to run a simple minikube in the docker that just print the list of the pods. What is wrong here?