Last active
May 23, 2025 21:14
-
-
Save guerrerocarlos/01a5adaa37203df088742b5fe96b92aa to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Create cluster | |
eksctl create cluster \ | |
--name dapr-test-cluster \ | |
--version 1.29 \ | |
--region us-east-2 \ | |
--nodegroup-name standard-workers \ | |
--node-type t3.medium \ | |
--nodes 2 \ | |
--nodes-min 1 \ | |
--nodes-max 3 \ | |
--managed \ | |
--node-volume-size 20 \ | |
--node-volume-type gp3 \ | |
--asg-access \ | |
--external-dns-access \ | |
--full-ecr-access \ | |
--appmesh-access \ | |
--alb-ingress-access \ | |
--with-ebs-csi | |
helm repo add aws-ebs-csi-driver https://kubernetes-sigs.github.io/aws-ebs-csi-driver | |
helm upgrade --install aws-ebs-csi-driver \ | |
--namespace kube-system \ | |
aws-ebs-csi-driver/aws-ebs-csi-driver | |
helm install redis bitnami/redis --set auth.enabled=true --set auth.password=redis --set master.persistence.enabled=false --set replica.persistence.enabled=false | |
helm upgrade --install dapr dapr/dapr \ | |
--namespace dapr-system \ | |
--create-namespace \ | |
--set global.ha.enabled=false | |
## Maybe change the way the redis is installed from helm to match the parametrs on the existing redis.yml ? | |
kubectl apply -f dapr-redis-updated.yaml | |
kubectl apply -f ../node.yaml | |
# wait for | |
kubectl rollout status deploy/nodeapp | |
# Get public endpoint with | |
kubectl get svc nodeapp | |
# curl with /ports | |
# send new order | |
curl --request POST --data "@sample.json" --header Content-Type:application/json ENDPOINT/neworder | |
# check order | |
curl ENDPOINT/order | |
kubectl apply -f ../python.yaml | |
# check status | |
kubectl rollout status deploy/pythonapp | |
# check logs | |
kubectl logs --selector=app=node -c daprd --tail=-1 | |
# chedk dapr logs | |
kubectl logs --selector=app=python -c daprd --tail=-1 | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: dapr.io/v1alpha1 | |
kind: Component | |
metadata: | |
name: statestore | |
spec: | |
type: state.redis | |
version: v1 | |
metadata: | |
- name: redisHost | |
value: redis-master:6379 | |
- name: redisPassword | |
secretKeyRef: | |
name: redis | |
key: redis-password | |
auth: | |
secretStore: kubernetes |
Cleanup:
Delete applications
kubectl delete -f node.yaml
kubectl delete -f python.yaml
kubectl delete -f redis-statestore.yaml
Delete Redis
helm uninstall redis
Delete Dapr
helm uninstall dapr -n dapr-system
kubectl delete namespace dapr-system
eksctl delete cluster --name dapr-test-cluster --region us-east-2
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If you see errors related to volume binding, try reinstalling Dapr with:
helm upgrade dapr dapr/dapr
--namespace dapr-system
--set global.ha.enabled=false
--set dapr_scheduler.cluster.storageDriver=emptyDir