Skip to content

Commit 6f8fcb2

Browse files
authored
Update setup-eks.md (#4423)
* Update setup-eks.md Signed-off-by: Fernando Rocha <[email protected]> * Update setup-eks.md Signed-off-by: Fernando Rocha <[email protected]> * Update setup-eks.md Signed-off-by: Fernando Rocha <[email protected]> * Update setup-eks.md Signed-off-by: Fernando Rocha <[email protected]> --------- Signed-off-by: Fernando Rocha <[email protected]>
1 parent 602af42 commit 6f8fcb2

File tree

1 file changed

+71
-7
lines changed
  • daprdocs/content/en/operations/hosting/kubernetes/cluster

1 file changed

+71
-7
lines changed

daprdocs/content/en/operations/hosting/kubernetes/cluster/setup-eks.md

+71-7
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ This guide walks you through installing an Elastic Kubernetes Service (EKS) clus
1616
- [AWS CLI](https://aws.amazon.com/cli/)
1717
- [eksctl](https://eksctl.io/)
1818
- [An existing VPC and subnets](https://docs.aws.amazon.com/eks/latest/userguide/network_reqs.html)
19+
- [Dapr CLI](https://docs.dapr.io/getting-started/install-dapr-cli/)
1920

2021
## Deploy an EKS cluster
2122

@@ -25,20 +26,57 @@ This guide walks you through installing an Elastic Kubernetes Service (EKS) clus
2526
aws configure
2627
```
2728

28-
1. Create an EKS cluster. To use a specific version of Kubernetes, use `--version` (1.13.x or newer version required).
29+
1. Create a new file called `cluster-config.yaml` and add the content below to it, replacing `[your_cluster_name]`, `[your_cluster_region]`, and `[your_k8s_version]` with the appropriate values:
30+
31+
```yaml
32+
apiVersion: eksctl.io/v1alpha5
33+
kind: ClusterConfig
34+
35+
metadata:
36+
name: [your_cluster_name]
37+
region: [your_cluster_region]
38+
version: [your_k8s_version]
39+
tags:
40+
karpenter.sh/discovery: [your_cluster_name]
41+
42+
iam:
43+
withOIDC: true
44+
45+
managedNodeGroups:
46+
- name: mng-od-4vcpu-8gb
47+
desiredCapacity: 2
48+
minSize: 1
49+
maxSize: 5
50+
instanceType: c5.xlarge
51+
privateNetworking: true
52+
53+
addons:
54+
- name: vpc-cni
55+
attachPolicyARNs:
56+
- arn:aws:iam::aws:policy/AmazonEKS_CNI_Policy
57+
- name: coredns
58+
version: latest
59+
- name: kube-proxy
60+
version: latest
61+
- name: aws-ebs-csi-driver
62+
wellKnownPolicies:
63+
ebsCSIController: true
64+
```
65+
66+
1. Create the cluster by running the following command:
2967
3068
```bash
31-
eksctl create cluster --name [your_eks_cluster_name] --region [your_aws_region] --version [kubernetes_version] --vpc-private-subnets [subnet_list_seprated_by_comma] --without-nodegroup
69+
eksctl create cluster -f cluster.yaml
3270
```
33-
34-
Change the values for `vpc-private-subnets` to meet your requirements. You can also add additional IDs. You must specify at least two subnet IDs. If you'd rather specify public subnets, you can change `--vpc-private-subnets` to `--vpc-public-subnets`.
35-
36-
1. Verify kubectl context:
71+
72+
1. Verify the kubectl context:
3773

3874
```bash
3975
kubectl config current-context
4076
```
4177

78+
## Add Dapr requirements for sidecar access and default storage class:
79+
4280
1. Update the security group rule to allow the EKS cluster to communicate with the Dapr Sidecar by creating an inbound rule for port 4000.
4381

4482
```bash
@@ -49,11 +87,37 @@ This guide walks you through installing an Elastic Kubernetes Service (EKS) clus
4987
--source-group [your_security_group]
5088
```
5189

90+
2. Add a default storage class if you don't have one:
91+
92+
```bash
93+
kubectl patch storageclass gp2 -p '{"metadata": {"annotations":{"storageclass.kubernetes.io/is-default-class":"true"}}}'
94+
```
95+
96+
## Install Dapr
97+
98+
Install Dapr on your cluster by running:
99+
100+
```bash
101+
dapr init -k
102+
```
103+
104+
You should see the following response:
105+
106+
```bash
107+
⌛ Making the jump to hyperspace...
108+
ℹ️ Note: To install Dapr using Helm, see here: https://docs.dapr.io/getting-started/install-dapr-kubernetes/#install-with-helm-advanced
109+
110+
ℹ️ Container images will be pulled from Docker Hub
111+
✅ Deploying the Dapr control plane with latest version to your cluster...
112+
✅ Deploying the Dapr dashboard with latest version to your cluster...
113+
✅ Success! Dapr has been installed to namespace dapr-system. To verify, run `dapr status -k' in your terminal. To get started, go here: https://docs.dapr.io/getting-started
114+
```
115+
52116
## Troubleshooting
53117
54118
### Access permissions
55119
56-
If you face any access permissions, make sure you are using the same AWS profile that was used to create the cluster. If needed, update the kubectl configuration with the correct profile:
120+
If you face any access permissions, make sure you are using the same AWS profile that was used to create the cluster. If needed, update the kubectl configuration with the correct profile. More information [here](https://repost.aws/knowledge-center/eks-api-server-unauthorized-error):
57121
58122
```bash
59123
aws eks --region [your_aws_region] update-kubeconfig --name [your_eks_cluster_name] --profile [your_profile_name]

0 commit comments

Comments
 (0)