├── LICENSE ├── README.md ├── blue-green-deployment ├── README.md ├── kubernetes │ └── README.md └── swarm │ └── README.md ├── cluster-setup ├── README.md └── google-cloud-platform │ ├── kubernetes │ └── README.md │ └── swarm │ └── README.md └── persistent-storage ├── kubernetes └── README.md └── swarm └── README.md /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "{}" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright {yyyy} {name of copyright owner} 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Container Orchestration Framework Comparisons 2 | This repo contains tutorials on how to perform common task (like deploying a cluster) with various Container Orchestration tools. 3 | 4 | PRs welcome! 5 | 6 | If your tool of choice isn't listed below -- add it. 7 | 8 | # Supported Frameworks 9 | | framework | version | 10 | | --- | --- | 11 | | Kubernetes (k8s) | v.1.3.0 | 12 | | Swarm | v1.12.0-rc2 | 13 | 14 | More to come (ie, marthon+mesos, nomad, etc). 15 | 16 | # Supported Providers 17 | Google Cloud Platform (GCP) 18 | 19 | More to come (ie, Amazon Web Services, Azure, etc). 20 | 21 | # Tutorials 22 | 23 | ## Bringing up clusters 24 | 25 | How to set up the different frameworks on various cloud providers. 26 | 27 | If there's a hosted version it's represented like so: hosted / non-hosted 28 | 29 | | | Google Cloud Platform | 30 | | --- | --- | 31 | | Kubernetes | [hosted](cluster-setup/google-cloud-platform/kubernetes/README.md) / non-hosted | 32 | | Swarm | [non-hosted](cluster-setup/google-cloud-platform/swarm/README.md) | 33 | 34 | ## Common Tasks 35 | 36 | | | Kubernetes | Swarm | 37 | | --- | --- | --- | 38 | | [Blue/Green Deployments](blue-green-deployment/) | [link](blue-green-deployment/kubernetes/README.md) | TBD | 39 | | Route traffic to multiple backends with nginx | TBD | TBD | 40 | -------------------------------------------------------------------------------- /blue-green-deployment/README.md: -------------------------------------------------------------------------------- 1 | #Blue-Green Deplyoments 2 | 3 | ##What is a Blue-Green Deployment? 4 | 5 | Blue-green deployment is a release technique that reduces downtime and risk by 6 | running two identical production environments called Blue and Green. 7 | 8 | At any time, only one of the environments is live, with the live environment 9 | serving all production traffic. 10 | For this example, Blue is currently live and Green is idle. 11 | 12 | As you prepare a new release of your software, deployment and the final stage of 13 | testing takes place in the environment that is *not* live: in this example, 14 | Green. 15 | Once you have deployed and fully tested the software in Green, you switch the 16 | router so all incoming requests now go to Green instead of Blue. 17 | Green is now live, and Blue is idle. 18 | 19 | This technique can eliminate downtime due to application deployment. 20 | In addition, blue-green deployment reduces risk: if something unexpected happens 21 | with your new release on Green, you can immediately roll back to the last 22 | version by switching back to Blue. 23 | 24 | [Source](https://docs.cloudfoundry.org/devguide/deploy-apps/blue-green.html) 25 | 26 | ##The challenge: 27 | 28 | - Deploy "Version 1" of an application as "Blue" 29 | - Ensure "Blue" is serving traffic 30 | - Deploy "Version 2" of an application as "Green" 31 | - Ensure "Blue" is still serving traffic 32 | - Flip the traffic to "Green" (no client side changes allowed) 33 | - Ensure "Green" is serving traffic and "Blue" is idle 34 | - Deploy "Version 3" of an application as "Blue" 35 | - Ensure "Green" is still serving traffic 36 | - Flip the traffic to "Blue" (no client side changes allowed) 37 | - Ensure "Blue" is serving traffic and "Green" is idle -------------------------------------------------------------------------------- /blue-green-deployment/kubernetes/README.md: -------------------------------------------------------------------------------- 1 | # Blue-Green Deployment 2 | Steps to perform a manual Blue-Green Deployment on Kubernetes 3 | 4 | ### Prerequisites 5 | - Provisioned Kubernetes Cluster 6 | - kubectl 7 | 8 | ### Step 1: Create Stable Service 9 | 10 | A *service* is also called a *router* or *load balancer*. 11 | 12 | This service will target containers tagged with the color "blue" and the type "webserver". 13 | 14 | **service.yaml:** 15 | 16 | ```yaml 17 | apiVersion: v1 18 | kind: Service 19 | metadata: 20 | name: webserver 21 | spec: 22 | type: LoadBalancer 23 | ports: 24 | - port: 80 25 | targetPort: 80 26 | protocol: TCP 27 | selector: 28 | type: webserver 29 | color: blue 30 | ``` 31 | 32 | Create service: 33 | - `kubectl apply -f service.yaml` 34 | 35 | Get IP address for the service: 36 | 37 | - `kubectl get svc webserver` 38 | ``` 39 | NAME CLUSTER-IP EXTERNAL-IP PORT(S) AGE 40 | webserver 10.XXX.XXX.XXX AAA.BBB.CCC.DDD 80/TCP 5m 41 | ``` 42 | 43 | Assume `AAA.BBB.CCC.DDD` is the IP address. 44 | 45 | ### Step 2: Launch First Version 46 | 47 | Launch three containers running the v1 software. This version will be tagged "blue." 48 | 49 | **blue.yaml:** 50 | 51 | ```yaml 52 | apiVersion: extensions/v1beta1 53 | kind: Deployment 54 | metadata: 55 | name: webserver-blue 56 | spec: 57 | replicas: 3 58 | template: 59 | metadata: 60 | labels: 61 | type: webserver 62 | color: blue 63 | spec: 64 | containers: 65 | - image: CONTAINER:1.0 66 | name: webserver-container 67 | ports: 68 | - containerPort: 80 69 | name: http-server 70 | ``` 71 | 72 | Create deployment: 73 | - `kubectl apply -f blue.yaml` 74 | 75 | Going to `AAA.BBB.CCC.DDD` we will see the first version serving traffic. 76 | 77 | ### Step 3: Launch Second Version 78 | 79 | Launch three containers running the v2 software. This version will be tagged "green." 80 | 81 | **green.yaml:** 82 | 83 | ```yaml 84 | apiVersion: extensions/v1beta1 85 | kind: Deployment 86 | metadata: 87 | name: webserver-green 88 | spec: 89 | replicas: 3 90 | template: 91 | metadata: 92 | labels: 93 | type: webserver 94 | color: green 95 | spec: 96 | containers: 97 | - image: CONTAINER:2.0 98 | name: webserver-container 99 | ports: 100 | - containerPort: 80 101 | name: http-server 102 | ``` 103 | 104 | Create deployment: 105 | - `kubectl apply -f green.yaml` 106 | 107 | ### Step 4: Switch from Blue to Green 108 | 109 | Edit the Service so it sends traffic to the Green deployment. 110 | - `kubectl edit svc webserver` 111 | 112 | This will open the YAML in a text editor. Change "blue" to "green" and save. 113 | 114 | Going to `AAA.BBB.CCC.DDD` we will see the second version serving traffic. 115 | 116 | ### Step 5: Launch Third Version 117 | 118 | Update the "blue" deployment to version 3. 119 | 120 | - `kubectl set image deployment/webserver-blue webserver-container=CONTAINER:3.0` 121 | 122 | ### Step 6: Switch from Green to Blue 123 | 124 | Edit the Service so it sends traffic to the Blue deployment. 125 | - `kubectl edit svc webserver` 126 | 127 | This will open the YAML in a text editor. Change "green" to "blue" and save. 128 | 129 | Going to `AAA.BBB.CCC.DDD` we will see the third version serving traffic. 130 | -------------------------------------------------------------------------------- /blue-green-deployment/swarm/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thesandlord/container-orchestration-comparisons/8e8f1c199eae6ae441477ea90d34fc8bf6342e65/blue-green-deployment/swarm/README.md -------------------------------------------------------------------------------- /cluster-setup/README.md: -------------------------------------------------------------------------------- 1 | #Cluster Setup 2 | 3 | ##The challenge: 4 | 5 | - Create a cluster with three "worker" nodes 6 | - If the cluster manager requires a master, that must also be set up 7 | - Must be able to securely connect to the cluster from a computer not on the same network (i.e over the internet) 8 | - Add a worker node to the cluster 9 | - Drain and Delete worker node from the cluster 10 | -------------------------------------------------------------------------------- /cluster-setup/google-cloud-platform/kubernetes/README.md: -------------------------------------------------------------------------------- 1 | # Cluster Setup on Container Engine 2 | Steps to set up a Kubernetes cluster with Google Container Engine 3 | 4 | ### Prerequisites 5 | - [Google Cloud Platform account](cloud.google.com/freetrial) 6 | - [gcloud sdk](cloud.google.com/sdk) 7 | - optionally, you can use [Cloud Shell](https://cloud.google.com/shell/docs/) 8 | - kubectl 9 | 10 | ### Step 1: Create Cluster 11 | 12 | We will create a cluster called 'mycluster' with three nodes 13 | 14 | `gcloud container clusters create mycluster --num-nodes 3` 15 | 16 | ### Step 2: Authenticate into the Cluster 17 | 18 | `gcloud container clusters get-credentials mycluster` 19 | 20 | ### Step 3: Add Extra Node to the Cluster 21 | 22 | `gcloud container clusters resize mycluster --size 4` 23 | 24 | ### Step 4: Remove Extra Node from the Cluster 25 | 26 | `gcloud container clusters resize mycluster --size 3` 27 | 28 | ##Optional - Drain node before deleting: 29 | This shouldn't be strictly necessary, as kubernetes will detect a node is deleted and automatically reschedule work. 30 | 31 | ### Step 4: Get list of Nodes 32 | 33 | `kubectl get nodes` 34 | 35 | | NAME | STATUS | AGE | 36 | | --- | --- | --- | 37 | | gke-mycluster-default-pool-9b43461b-1yn9 | Ready | 4m | 38 | | gke-mycluster-default-pool-9b43461b-c1vd | Ready | 4m | 39 | | gke-mycluster-default-pool-9b43461b-j2c3 | Ready | 4m | 40 | | gke-mycluster-default-pool-9b43461b-r5xb | Ready | 3m | 41 | 42 | ### Step 5: Drain a node 43 | I just picked a node at random 44 | 45 | `kubectl drain gke-mycluster-default-pool-9b43461b-c1vd` 46 | 47 | `kubectl get nodes` 48 | 49 | | NAME | STATUS | AGE | 50 | | --- | --- | --- | 51 | | gke-mycluster-default-pool-9b43461b-1yn9 | Ready | 4m | 52 | | gke-mycluster-default-pool-9b43461b-c1vd | Ready,SchedulingDisabled | 4m | 53 | | gke-mycluster-default-pool-9b43461b-j2c3 | Ready | 4m | 54 | | gke-mycluster-default-pool-9b43461b-r5xb | Ready | 3m | 55 | 56 | ### Step 6: Delete Node and Resize Cluster 57 | 58 | ``` 59 | gcloud compute instances delete gke-mycluster-default-pool-9b43461b-c1vd && \ 60 | gcloud container clusters resize mycluster --size 3 61 | ``` 62 | 63 | Be sure to answer 'Y' to the questions. Or you can use this command if you want a fully automated solution: 64 | 65 | ``` 66 | yes y | gcloud compute instances delete gke-mycluster-default-pool-9b43461b-c1vd && \ 67 | yes y | gcloud container clusters resize mycluster --size 3 68 | ``` -------------------------------------------------------------------------------- /cluster-setup/google-cloud-platform/swarm/README.md: -------------------------------------------------------------------------------- 1 | # Cluster Setup on Compute Engine 2 | Steps to set up a Docker Swarm cluster with Google Compute Engine 3 | 4 | Note: This is not the best way to create a Swarm cluster on GCP. When the [setup script](https://github.com/thesandlord/google-cloud-swarm.git) supports Managed Instances Groups, clusters will be more robust and easier to scale. 5 | 6 | ### Prerequisites 7 | - [Google Cloud Platform account](cloud.google.com/freetrial) 8 | - [gcloud sdk](cloud.google.com/sdk) 9 | - [Docker 1.12](https://www.docker.com/products/overview) 10 | - Docker Machine 0.8.0 11 | 12 | ### Step 1: Configure Setup Script 13 | 14 | `git clone https://github.com/thesandlord/google-cloud-swarm.git` 15 | 16 | Specify 3 workers in `options.sh` 17 | 18 | `sed -i bak -e s/NUM_WORKERS=2/NUM_WORKERS=3/g options.sh` 19 | 20 | ### Step 2: Create Cluster 21 | 22 | `./swarm-up` 23 | 24 | ### Step 3: Add Extra Node to the Cluster 25 | 26 | Start a new shell and load environment variables: 27 | 28 | ``` 29 | sh 30 | 31 | source options.sh 32 | ``` 33 | 34 | Create Node: 35 | ``` 36 | docker-machine create $PREFIX-worker-4 \ 37 | --engine-install-url $ENGINE_INSTALL_URL \ 38 | -d google \ 39 | --google-machine-type $WORKER_MACHINE_TYPE \ 40 | --google-zone $WORKER_ZONE \ 41 | --google-disk-size $WORKER_DISK \ 42 | --google-tags $TAGS \ 43 | --google-project $PROJECT_ID 44 | ``` 45 | 46 | Join the Swarm: 47 | 48 | ``` 49 | SWARM_MANAGER_INTERNAL_IP=$(gcloud compute instances describe $PREFIX-manager-1 \ 50 | --zone $MANAGER_ZONE --format=text | \ 51 | grep '^networkInterfaces\[[0-9]\+\]\.networkIP:' | \ 52 | sed 's/^.* //g') 53 | 54 | eval $(docker-machine env $PREFIX-worker-4) && \ 55 | docker swarm join $SWARM_MANAGER_INTERNAL_IP:2377 --secret $SWARM_SECRET 56 | ``` 57 | Exit the shell: 58 | 59 | `exit` 60 | 61 | ### Step 4: Remove Extra Node from the Cluster 62 | 63 | ``` 64 | $(source options.sh && docker-machine rm -f $PREFIX-worker-4) 65 | 66 | $(source options.sh && docker node rm $PREFIX-worker-4) 67 | ``` 68 | 69 | ##Optional - Drain node before deleting: 70 | This shouldn't be strictly necessary, as swarm will detect a node is deleted and automatically reschedule work. 71 | 72 | ### Step 4: Get list of Nodes 73 | 74 | `docker nodes ls` 75 | 76 | | ID | NAME | MEMBERSHIP | STATUS | AVAILABILITY | MANAGER STATUS | 77 | | --- | --- | --- | --- | --- | --- | 78 | | 7s21m2bcz5i1ks8dv9hcmfwvk | my-swarm-worker-1 | Accepted | Ready | Active | | 79 | | 9xd6pzp2fv5is3a69ng0ms7s5 | my-swarm-worker-2 | Accepted | Ready | Active | | 80 | | by2uchvhbzx0ybgj11s5y7cto * | my-swarm-manager-1 | Accepted | Ready | Active | Leader | 81 | | czaeu4mdifnvkv3ld1mh90xek | my-swarm-worker-4 | Accepted | Ready | Active | | 82 | 83 | ### Step 5: Drain a node 84 | I just picked a node at random 85 | 86 | `docker node update --availability drain my-swarm-worker-4` 87 | 88 | `docker nodes ls` 89 | 90 | | ID | NAME | MEMBERSHIP | STATUS | AVAILABILITY | MANAGER STATUS | 91 | | --- | --- | --- | --- | --- | --- | 92 | | 7s21m2bcz5i1ks8dv9hcmfwvk | my-swarm-worker-1 | Accepted | Ready | Active | | 93 | | 9xd6pzp2fv5is3a69ng0ms7s5 | my-swarm-worker-2 | Accepted | Ready | Active | | 94 | | by2uchvhbzx0ybgj11s5y7cto * | my-swarm-manager-1 | Accepted | Ready | Active | Leader | 95 | | czaeu4mdifnvkv3ld1mh90xek | my-swarm-worker-4 | Accepted | Ready | Drain | | 96 | 97 | ### Step 6: Delete Node and Resize Cluster 98 | 99 | `docker-machine rm -f my-swarm-worker-4` 100 | 101 | `docker node rm my-swarm-worker-4` -------------------------------------------------------------------------------- /persistent-storage/kubernetes/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thesandlord/container-orchestration-comparisons/8e8f1c199eae6ae441477ea90d34fc8bf6342e65/persistent-storage/kubernetes/README.md -------------------------------------------------------------------------------- /persistent-storage/swarm/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thesandlord/container-orchestration-comparisons/8e8f1c199eae6ae441477ea90d34fc8bf6342e65/persistent-storage/swarm/README.md --------------------------------------------------------------------------------