I am setting up a new project that will include a number of micro services (Spring Boot apps). I plan to use Kubernetes/Docker and deployment to AWS.
there will be 5 separate applications (microservices) tat will talk to each other over a REST api.
Question
How many Clusters must I create?
Can I create just one Cluster with Nodes with multiples Pods (i.e. 5 Pods each Node)? AWS will then auto scale the nodes in the cluster.
e.g.
------------- -------------
| Node 1 | | Node 2 |
------------- -------------
| Pod/App1 | | Pod/App1 |
| Pod/App2 | | Pod/App2 |
| Pod/App3 | | Pod/App3 |
| Pod/App4 | | Pod/App4 |
| Pod/App5 | | Pod/App5 |
------------- -------------
CodePudding user response:
You will need to create just one cluster yes, with at least one node. All your pods allocation will be managed automatically by Kubernetes.
If your apps need to talk directly to each other, you will even be able to directly call them with http://your_Service_name : the call will stay inside the cluster and private, thanks to this network mechanism offered by Kubernetes.
CodePudding user response:
Yes, you can use one AWS EKS that has one managed node group with two nodes to run your microservices. To create one, it is as simple as running a command eksctl create cluster. One thing to note is currently AWS EKS do not automatically scale node, you need to install cluster autoscaler that will scale up/down the number of nodes for you.