Create a gist now

Instantly share code, notes, and snippets.

Embed
What would you like to do?
docker for windows -- kubernetes
PS C:\dev\projects\python\kubetest> docker stack deploy --compose-file .\docker-compose.yml web
Ignoring unsupported options: build
Stack web was created
Waiting for the stack to be stable and running...
- Service redis has one container running
PS C:\dev\projects\python\kubetest> kubectl get services
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
kubernetes ClusterIP 10.96.0.1 <none> 443/TCP 13d
redis ClusterIP None <none> 55555/TCP 10s
PS C:\dev\projects\python\kubetest> docker stack deploy --compose-file .\docker-compose.yml web
Ignoring unsupported options: build
Stack.compose.docker.com "web" is invalid: web: Invalid value: "version: \"3.0\"\nservices:\n redis:\n image: redis\n web:\n build:\n context: .\n ports:\n - mode: ingress\n target: 5000\n published: 5000\n protocol: tcp\n volumes:\n - type: bind\n source: C:\\dev\\projects\\python\\kubetest\n target: /code\nnetworks: {}\nvolumes: {}\nsecrets: {}\nconfigs: {}\n": parse error: services.web.volumes.0 must be a string
PS C:\dev\projects\python\kubetest> docker stack deploy --compose-file .\docker-compose.yml web
Ignoring unsupported options: build
Stack.compose.docker.com "web" is invalid: web: Invalid value: "version: \"3.0\"\nservices:\n redis:\n image: redis\n web:\n build:\n context: .\n ports:\n - mode: ingress\n target: 5000\n published: 5000\n protocol: tcp\n volumes:\n - type: bind\n source: C:\\dev\\projects\\python\\kubetest\n target: /code\nnetworks: {}\nvolumes: {}\nsecrets: {}\nconfigs: {}\n": parse error: services.web.ports.0 must be a string or number
version: '3.3'
services:
web:
build: .
image: kubetest-web
ports:
- "5000:5000"
redis:
image: redis
rm: can't remove 'usr/lib/libtasn1.so.6.5.4': No such file or directory
ERROR: Service 'words' failed to build: The command '/bin/sh -c apk add --no-cache openjdk8-jre="8.151.12-r0" && rm usr/lib/libgif.so.7.0.0 usr/lib/libtasn1.so.6.5.4' returned a non-zero code: 1
PS C:\dev\projects\python\k8s-wordsmith-demo> docker stack deploy --compose-file .\docker-compose.yml web
Ignoring unsupported options: build
Stack web was created
Waiting for the stack to be stable and running...
- Service db has one container running
- Service web has one container running
PS C:\dev\projects\python\k8s-wordsmith-demo> kubectl get services
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
db ClusterIP None <none> 55555/TCP 29s
kubernetes ClusterIP 10.96.0.1 <none> 443/TCP 13d
web ClusterIP None <none> 55555/TCP 29s
web-published LoadBalancer 10.107.22.238 localhost 8080:31908/TCP 29s
words ClusterIP None <none> 55555/TCP 29s
PS C:\dev\projects\python\k8s-wordsmith-demo> kubectl get pods
NAME READY STATUS RESTARTS AGE
db-5996bd8-jzbv7 1/1 Running 0 1m
web-64df788495-dktjl 1/1 Running 0 1m
words-c99d9dc55-fnb8b 1/1 Running 0 1m
words-c99d9dc55-m2k7q 1/1 Running 0 1m
words-c99d9dc55-n8sxc 1/1 Running 0 1m
words-c99d9dc55-ngllw 1/1 Running 0 1m
words-c99d9dc55-vrwtk 1/1 Running 0 1m
PS C:\dev\projects\python\kubetest> docker-compose build
Building web
Step 1/6 : FROM python:3.4-alpine
.... redacted for brevity .....
Step 6/6 : CMD ["python", "app.py"]
---> Running in c18046aff583
Removing intermediate container c18046aff583
---> 2c21b2034b76
Successfully built 2c21b2034b76
Successfully tagged kubetest-web:latest
redis uses an image, skipping
PS C:\dev\projects\python\kubetest> docker stack deploy --compose-file .\docker-compose.yml web
Ignoring unsupported options: build
Stack web was created
Waiting for the stack to be stable and running...
- Service redis has one container running
- Service web has one container running
PS C:\dev\projects\python\kubetest> kubectl get services
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
kubernetes ClusterIP 10.96.0.1 <none> 443/TCP 8d
redis ClusterIP None <none> 55555/TCP 10s
web ClusterIP None <none> 55555/TCP 10s
web-published LoadBalancer 10.108.250.208 localhost 5000:30507/TCP 10s
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment