Deployment using Kubernetes - feasibility of Master And Nodes in same machine

3/21/2018

I am trying to deploy my microservices using Kubernetes. And also I have one Ubuntu 16.04 machine as AWS Ec2. In that AWS Ec2 I need to use Kubernetes and deploy my microservices developed using Spring Boot. I already explored the architecture of Kubernetes. But when I am learning how to install Kubernetes in Ubuntu.

It showing that need at least two machine, one for master and another for nodes (worker machines). I am adding the one or two links that I readed for installing Kubernetes below:

  1. https://medium.com/@Grigorkh/install-kubernetes-on-ubuntu-1ac2ef522a36
  2. https://medium.com/@SystemMining/setup-kubenetes-cluster-on-ubuntu-16-04-with-kubeadm-336f4061d929

And I am here need to clarify my confusions related with Kubernetes and its installation. I am adding confusions below section:

  1. Can I use one Ubuntu 16.04 machine for both master and worker for my microservice deployment?
  2. Can I integrate Kubernetes with Jenkins in the same ubuntu 16.04 machine, since I am planning to choose Ec2 Ubuntu 16.04 LTS for this?
  3. If master and node in same machine is possible (doubt 1), then how I can create different number of nodes when I am initializing my cluster by using kubeadm init?

enter image description here

I am only a beginner with this.

-- Jacob
amazon-web-services
kubernetes
ubuntu

1 Answer

3/21/2018

Let's clarify one by one.

Can I use one ubuntu 16.04 machine for both master and worker for my microservice deployment?

Yes, you can use one server for all components, but if you will run your master and node in different VMs or containers. Theoretically, it is possible to create all-in-one server without that, but its a tricky way and I don't recommend it to you.

Can I integrate Kubernetes with Jenkins in the same ubuntu 16.04 machine? , Since I am planning to choose Ec2 Ubuntu 16.04 LTS for this

You can, as example, install Jenkins inside a Kubernetes, or install it somewhere else and integrate. So - yes, you can. Here is one of the articles about it.

If master and node in same machine is possible (Doubt 1), Then How I can create different number of nodes when I am initializing my cluster by using kubeadm init?

You cannot create multiple nodes on a single machine without docker-in-docker solution or VMs.

Actually, I highly recommend you Minikube for single node Kubernetes. It will automatically create for you a local cluster in VMs in one click.

-- Anton Kostenko
Source: StackOverflow