Reputation: 8955
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 |
+-------------+ +-------------+
Upvotes: 0
Views: 1433
Reputation: 862
One AWS EKS is enough. But to run your services this cluster has to have one managed node group with two nodes.
Take a look at this documentation. You can find here basic cluster creation with a different name:
eksctl create cluster --name=cluster-1 --nodes=2
NOTE: EKS supports versions
1.18
,1.19
,1.20
and1.21
(default). Witheksctl
you can deploy any of the supported versions by passing--version
.eksctl create cluster --version=1.18
If you want to see most options that can be specified during creating a cluster with eksctl
, run following command:
eksctl create cluster --help
At this documentation one can find examples of config files.
About Autoscaling, see this doc.
Amazon EKS supports two autoscaling products. The Kubernetes Cluster Autoscaler and the Karpenter open source autoscaling project.
Before deploying the Cluster Autoscaler pay attention to Prerequisites you have to meet:
- An existing Amazon EKS cluster – If you don’t have a cluster, see Creating an Amazon EKS cluster.
- An existing IAM OIDC provider for your cluster. To determine whether you have one or need to create one, see Create an IAM OIDC provider for your cluster.
- Node groups with Auto Scaling groups tags. The Cluster Autoscaler requires the following tags on your Auto Scaling groups so that they can be auto-discovered.
- If you used
eksctl
to create your node groups, these tags are automatically applied.
See also:
Upvotes: 0
Reputation: 15530
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.
Upvotes: 2
Reputation: 1009
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.
Upvotes: 1