os/macOS/kubernetes/demo1/README.md
git clone https://github.com/ajeetraina/docker101/
cd docker101/for-mac/kubernetes/demo1/
docker stack deploy -c docker-compose.yml collabme
NAME AGE
collabme 10h
docker stack ls
NAME SERVICES
collabme 2
kubectl describe stacks collabme
Name: collabme
Namespace: default
Labels: <none>
Annotations: <none>
API Version: compose.docker.com/v1beta2
Kind: Stack
Metadata:
Creation Timestamp: 2018-04-15T16:27:58Z
Resource Version: 66697
Self Link: /apis/compose.docker.com/v1beta2/namespaces/default/stacks/collabme
UID: f5b72aa8-40c9-11e8-942e-025000000001
Spec:
Services:
Deploy:
Placement:
Resources:
Image: nginx:alpine
Name: db1
Deploy:
Placement:
Resources:
Image: nginx:alpine
Name: web1
Ports:
Mode: ingress
Protocol: tcp
Published: 8082
Target: 80
Status:
Message: Stack is started
Phase: Available
Events: <none>
curl localhost:8082
<!DOCTYPE html>
<html>
<head>
<title>Welcome to nginx!</title>
<style>
body {
width: 35em;
margin: 0 auto;
font-family: Tahoma, Verdana, Arial, sans-serif;
}
</style>
</head>
<body>
<h1>Welcome to nginx!</h1>
<p>If you see this page, the nginx web server is successfully installed and
working. Further configuration is required.</p>
<p>For online documentation and support please refer to
<a href="http://nginx.org/">nginx.org</a>.
Commercial support is available at
<a href="http://nginx.com/">nginx.com</a>.</p>
<p><em>Thank you for using nginx.</em></p>
</body>
</html>