Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
447 changes: 447 additions & 0 deletions .gitignore

Large diffs are not rendered by default.

59 changes: 59 additions & 0 deletions docs/steps-for-eks-cluster.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
### EKS Cluster

#### Scenario: Public EKS Cluster

##### Installations steps(MacOS):
1. Install AWS CLI
2. Install eksctl
3. Setup Pulumi
4. Install kubectl and helm

##### Steps to run pulumi on DevBox(MacOS)

1. Set AWS Profile
```
export AWS_PROFILE="aws_saayam"
export REGION="us-west-2"
aws configure --profile aws_saayam
```
2. Configure pulumi
```
pulumi config set aws:profile aws_saayam
pulumi config set aws:region us-west-2
```
3. Run Pulumi
```
cd pulumi-scripts
pulumi up
pulumi stack output kubeconfig > kubeconfig
export CLUSTER_NAME=$(pulumi stack output clusterName)
export VPC_ID=$(pulumi stack output vpcId)
export ALB_POLICY_ARN=$(pulumi stack output albPolicyArn)
aws eks update-kubeconfig --region us-west-2 --name $CLUSTER_NAME
# Fix Failed CoreDNS
kubectl rollout restart -n kube-system deployment coredns
eksctl create iamserviceaccount \
--cluster=$CLUSTER_NAME \
--namespace=kube-system \
--name=aws-load-balancer-controller \
--role-name AmazonEKSLoadBalancerControllerRole \
--attach-policy-arn=$ALB_POLICY_ARN \
--approve
helm repo add eks https://aws.github.io/eks-charts
helm install aws-load-balancer-controller eks/aws-load-balancer-controller \
-n kube-system \
--set clusterName=$CLUSTER_NAME \
--set serviceAccount.create=false \
--set serviceAccount.name=aws-load-balancer-controller \
--set region=$REGION \
--set vpcId=$VPC_ID
cd ..
cd kubernetes
kubectl apply -f deployment.yml
kubectl apply -f service.yml
kubectl get po -A -w
kubectl get deploy -n kube-system
kubectl get deployment -n kube-system
kubectl apply -f ingress.yml
kubectl delete deployment demo-dp -n kube-system
```
2 changes: 2 additions & 0 deletions pulumi-scripts/Pulumi.aws-saayam-westus2.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
config:
aws:region: us-west-2
10 changes: 10 additions & 0 deletions pulumi-scripts/Pulumi.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: pulumi-scripts
runtime:
name: nodejs
options:
packagemanager: npm
description: A minimal TypeScript Pulumi program
config:
pulumi:tags:
value:
pulumi:template: typescript
Loading