Is it possible to use docker compose to build a swarm/kubernetes cluster?

0 votes
Jul 3 in Docker by Sam
• 1,520 points
137 views

1 answer to this question.

0 votes

Yes, one can deploy a stack on Kubernetes with docker stack deploy command, the docker-compose.yml file, and the name of the stack.

Here's an example:

$docker stack deploy --compose-file /path/to/docker-compose.yml mystack

$docker stack services mystack

You can see the service deployed with the kubectl get services command 

$kubectl get svc,po,deploy
answered Jul 3 by Sirajul
• 25,420 points

Related Questions In Docker

0 votes
1 answer
0 votes
1 answer

Is it possible to spin-up a docker host on a cloud platform?

Yes, It is definitely possible to spin ...READ MORE

answered Jul 4 in Docker by Sirajul
• 25,420 points
50 views
0 votes
1 answer

Is it possible to start a shell session in a running container (without ssh)

use this docker exec -it "id of running ...READ MORE

answered Jul 25, 2018 in Docker by Kalgi
• 40,460 points
46 views
0 votes
1 answer

Is it possible to start a shell session in a running container (without ssh)

use this docker exec -it "id of running ...READ MORE

answered Jul 27, 2018 in Docker by Kalgi
• 40,460 points
44 views
0 votes
1 answer
+5 votes
7 answers

Docker swarm vs kubernetes

Swarm is easy handling while kn8 is ...READ MORE

answered Aug 27, 2018 in Docker by Mahesh Ajmeria
1,002 views
0 votes
1 answer

Is it possible to use JSON instead of YAML for docker-compose file?

You can use JSON instead of YAML ...READ MORE

answered Jul 2 in Docker by Sirajul
• 25,420 points
32 views
0 votes
1 answer