@grucloud/module-aws-eks
Version:
Grucloud module to manage an EKS Cluster
70 lines (52 loc) • 2.13 kB
Markdown
The purpose of the [module-aws-eks](https://www.npmjs.com/package/@grucloud/module-aws-vpc) is to create the resources to run an application on kubernetes with EKS: [Elastic Kubernetes Service](https://docs.aws.amazon.com/eks/latest/userguide/what-is-eks.html)
This module depends on [module-aws-vpc](https://www.npmjs.com/package/@grucloud/module-aws-vpc)
- [Iam Policy](https://www.grucloud.com/docs/aws/resources/IAM/IamPolicyReadOnly)
- [Iam Role](https://www.grucloud.com/docs/aws/resources/IAM/IamRole)
- [EKS Cluster](https://www.grucloud.com/docs/aws/resources/EKS/EksCluster)
- [Node Group](https://www.grucloud.com/docs/aws/resources/EKS/EksNodeGroup)
The default config sets cluster name and the tags for the vpc and subnets.
These tags are required by the [Aws Load Balancer Controller](https://docs.aws.amazon.com/eks/latest/userguide/aws-load-balancer-controller.html). This load balancer controller runs on your kunernetes cluster, his role is to create and destroy [AWS load balancer](https://aws.amazon.com/elasticloadbalancing).
```js
const clusterName = "cluster";
module.exports = ({}) => ({
EKS: {
cluster: {
name: clusterName,
},
},
vpc: {
vpc: {
Tags: [{ Key: `kubernetes.io/cluster/${clusterName}`, Value: "shared" }],
},
subnets: {
privateTags: [
{
Key: `kubernetes.io/cluster/${clusterName}`,
Value: "shared",
},
{ Key: "kubernetes.io/role/internal-elb", Value: "1" },
],
publicTags: [
{
Key: `kubernetes.io/cluster/${clusterName}`,
Value: "shared",
},
{ Key: "kubernetes.io/role/elb", Value: "1" },
],
},
},
});
```
```sh
gc graph
```

Look at the [example](https://github.com/grucloud/grucloud/tree/main/packages/modules/aws/eks/example) to find out how to use this module.