└── argocd-setup.md /argocd-setup.md: -------------------------------------------------------------------------------- 1 | # Create EKS Cluster From UI 2 | 3 | 1. **Create Role for EKS Cluster**: 4 | - Go to AWS Management Console. 5 | - Navigate to IAM (Identity and Access Management). 6 | - Click on "Roles" and then click on "Create role". 7 | - Choose "AWS Service" as the trusted entity. 8 | - Choose "EKS-cluster" as the use case. 9 | - Click "Next" and provide a name for the role. 10 | 11 | 2. **Create Role for EC2 Instances**: 12 | - Go to AWS Management Console. 13 | - Navigate to IAM (Identity and Access Management). 14 | - Click on "Roles" and then click on "Create role". 15 | - Choose "AWS Service" as the trusted entity. 16 | - Choose "EC2" as the use case. 17 | - Click "Next". 18 | - Add policies: [AmazonEC2ContainerRegistryReadOnly, AmazonEKS_CNI_Policy, AmazonEBSCSIDriverPolicy, AmazonEKSWorkerNodePolicy]. 19 | - Provide a name for the role, e.g., "myNodeGroupPolicy". 20 | 21 | 3. **Create EKS Cluster**: 22 | - Go to AWS Management Console. 23 | - Navigate to Amazon EKS service. 24 | - Click on "Create cluster". 25 | - Enter the desired name, select version, and specify the role created in step 1. 26 | - Configure Security Group, Cluster Endpoint, etc. 27 | - Click "Next" and proceed to create the cluster. 28 | 29 | 4. **Create Compute Resources**: 30 | - Go to AWS Management Console. 31 | - Navigate to Amazon EKS service. 32 | - Click on "Compute" or "Node groups". 33 | - Provide a name for the compute resource. 34 | - Select the role created in step 2. 35 | - Select Node Type & Size. 36 | - Click "Next" and proceed to create the compute resource. 37 | 38 | 5. **Configure Cloud Shell**: 39 | - Open AWS Cloud Shell or AWS CLI. 40 | - Execute the command: 41 | ``` 42 | aws eks update-kubeconfig --name shack-eks --region ap-south-1 43 | ``` 44 | - Replace "shack-eks" with the name of your EKS cluster and "ap-south-1" with the appropriate region if different. 45 | 46 | These steps should help you in setting up your EKS cluster along with necessary roles and compute resources. 47 | 48 | 49 | # Install ArgoCD 50 | 51 | Here are the steps to install ArgoCD and retrieve the admin password: 52 | 53 | 1. **Create Namespace for ArgoCD**: 54 | ```bash 55 | kubectl create namespace argocd 56 | ``` 57 | 58 | 2. **Apply ArgoCD Manifests**: 59 | ```bash 60 | kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/v2.4.7/manifests/install.yaml 61 | ``` 62 | 63 | 3. **Patch Service Type to LoadBalancer**: 64 | ```bash 65 | kubectl patch svc argocd-server -n argocd -p '{"spec": {"type": "LoadBalancer"}}' 66 | ``` 67 | 68 | 4. **Retrieve Admin Password**: 69 | ```bash 70 | kubectl -n argocd get secret argocd-initial-admin-secret -o jsonpath="{.data.password}" | base64 -d 71 | ``` 72 | 73 | These commands will install ArgoCD into the specified namespace, set up the service as a LoadBalancer, and retrieve the admin password for you to access the ArgoCD UI. 74 | --------------------------------------------------------------------------------