docker stack deploy
, thedocker-compose.yml
file, and the name of the stack.kubectl get services
command.default
namespace is used. You can specify a namespace withthe --namespace
flag.kubectl get services -n my-app
to see only the services deployed in themy-app
namespace.DOCKER_STACK_ORCHESTRATOR
variable to override the default orchestrator fora 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
orkubernetes
. The following command overrides the orchestrator for a singledeployment, by setting the variableat the start of the command itself.--orchestrator
flag may be set to swarm
or kubernetes
when deploying to override the default orchestrator for that deployment./usr/local/bin/kubectl
. This location may not be in your shell’s PATH
variable, so you may need to type the full path of the command or add it tothe PATH
. For more information about kubectl
, see theofficial kubectl
documentation.You can test the command by listing the available nodes:docker stack deploy
command.kubectl
command.localhost
from MacOS / Windows’ POV.192.168.99.100
instead of localhost
.C:UsersNicksrcmyapp
. Otherwise Docker won’t be able to find it.