As we have started using AWS cloud for Bahmni SAAS, We have to enable developers to be aware about various AWS & Kubernetes functionalities.
In the same phase, we are providing AWS CLI access for our Development team.
This will help us to debug, troubleshoot & see the deployed services in the form of Pods, Deployment, services. You can also view the logs of individuals pods to debug better.
Kubernetes commands which will help you.
Request you all to follow the below steps to setup AWS CLI on your machine.
Step 1: Install AWS CLI & Kubectl on your machine
brew install awscli
brew install kubectl
curl -LO https://storage.googleapis.com/kubernetes-release/release/v1.23.6/bin/darwin/amd64/kubectl
chmod +x ./kubectl
sudo mv ./kubectl /usr/local/bin/kubectl
NOTE: If doing it for first time, It will take sometime to install dependencies.
Step 2: Execute below command to configure the AWS Credentials shared to you by Infra folks.
This will ask you for inputs for access key, secret key, region & output format.
access key —> [that you received from your infra team]
secret key —> [that you received from your infra team]
region ——> ap-south-1
output format ——> [NO INPUTS NEEDED, JUST PRESS ENTER & MOVE AHEAD]
This credential will be saved as default.
Where are configuration settings stored?
You can see the details using below commands:
Step 3: Copy the below lines in
role_arn = arn:aws:iam::863324974761:role/BahmniEKSDeveloperRoleForIAMUsers
source_profile = default
Step 4: To Access Bahmni EKS cluster, set the AWS_PROFILE.
Step 5: Set the AWS EKS cluster config to map it will the running cluster.
This command is needed to setup the connectivity between your machine(terminal) with AWS EKS cluster.
aws eks update-kubeconfig --name bahmni-cluster-nonprod --region ap-south-1 --profile bahmni-eks-developers
Step 6: To verify you have received access execute the below commands
-n --- Namespaces
Currently we have following namespaces:
kubectl get pods -n <namespace>
kubectl get deployments -n <namespace>
If this shows details about the various pods & deployments running.
Attaching the Kubectl commands cheatsheet for your reference.
We are DONE with access now.
Please contact Infra squad (Slack: #bahmni-infra) if you are facing any issues while setting up your AWS CLI Access.