5

I running docker desktop with kubernetes option turned on. I have one node called docker-for-dektop. Now i have created a new ubuntu docker container. I want to add this container to my kubernetes cluster. Can be done? how can i do it?

Carlos Delgado
  • 316
  • 2
  • 11
  • You need to create a kubernetes deployment yaml and use kubectl comman to run this container on kubernetes cluster. Follow this [tutorial](https://kubernetes.io/docs/tutorials/kubernetes-basics/deploy-app/deploy-intro/) for more details – fatcook Feb 13 '19 at 07:21
  • this will create an app inside a existent node. I need to create a new node and run the container inside this new node. I want to run a cluster with at lease 3 nodes. This can be done with docker (not enterprise version)? – Carlos Delgado Feb 13 '19 at 09:47

1 Answers1

7

As far as I'm aware, you cannot add a node to Docker for Desktop with Kubernetes enabled.

Docker for Desktop is a single-node Kubernetes or Docker Swarm cluster, you might try using kubernetes-the-hard-way as this explains how to setup a cluster and add nodes manually without the use of kubeadm.

But I don't think this might work as there will be a lot of issues with setting up the network to work correctly.

You can also use the instructions on how to install kubeadm with kubelet and kubectl on Linux machine and adding a node using kubeadm join.

Black_Bacardi
  • 324
  • 4
  • 10
Crou
  • 10,232
  • 2
  • 26
  • 31