Update deploy on Kubernetes orchestrator instructions

This commit is contained in:
Jesse Antoszyk 2018-12-21 09:18:03 -05:00
parent 7a39bec77a
commit df113655bb
1 changed files with 11 additions and 4 deletions

View File

@ -88,7 +88,7 @@ Run `kubectl get services -n my-app` to see only the services deployed in the
### Override the default orchestrator ### Override the default orchestrator
While testing Kubernetes, you may want to deploy some workloads in swarm mode. While testing Kubernetes, you may want to deploy some workloads in swarm mode.
Use the `DOCKER_ORCHESTRATOR` variable to override the default orchestrator for Use the `DOCKER_STACK_ORCHESTRATOR` variable to override the default orchestrator for
a given terminal session or a single Docker command. This variable can be unset a given terminal session or a single Docker command. This variable can be unset
(the default, in which case Kubernetes is the orchestrator) or set to `swarm` or (the default, in which case Kubernetes is the orchestrator) or set to `swarm` or
`kubernetes`. The following command overrides the orchestrator for a single `kubernetes`. The following command overrides the orchestrator for a single
@ -96,17 +96,24 @@ deployment, by setting the variable{% if platform == "mac"" %}
at the start of the command itself. at the start of the command itself.
```bash ```bash
DOCKER_ORCHESTRATOR=swarm docker stack deploy --compose-file /path/to/docker-compose.yml mystack DOCKER_STACK_ORCHESTRATOR=swarm docker stack deploy --compose-file /path/to/docker-compose.yml mystack
```{% elsif platform == "windows" %} ```{% elsif platform == "windows" %}
before running the command. before running the command.
```shell ```shell
set DOCKER_ORCHESTRATOR=swarm set DOCKER_STACK_ORCHESTRATOR=swarm
docker stack deploy --compose-file /path/to/docker-compose.yml mystack docker stack deploy --compose-file /path/to/docker-compose.yml mystack
``` ```
{% endif %} {% endif %}
Alternatively, the `--orchestrator` flag may be set to `swarm` or `kubernetes`
when deploying to override the default orchestrator for that deployment.
```bash
docker stack deploy --orchestrator swarm --compose-file /path/to/docker-compose.yml mystack
```
> **Note**: Deploying the same app in Kubernetes and swarm mode may lead to > **Note**: Deploying the same app in Kubernetes and swarm mode may lead to
> conflicts with ports and service names. > conflicts with ports and service names.