Description
To connect to kubernetes cluster using your command line tool you have to install and configure kubectl. This is the command we use to connect to the cluster and execute a lot of tasks related to different configurations of each stage (namespaces). This guide explains how to configure this tools.
Requirements
IAM user inside 1doc3 user group ArchitectureManagers. AWS CLI command line tool installed and configured. jq command line tool installed. access to 1DOC3/argocd project repository. kubectl 1.23 command installed. Procedure
Inside 1DOC3/argocd repository, you can use the script ./utilities/assume-role.sh to assume KubeAdmin IAM role. Before executing the script be sure that the script has execution permissions. To do that, run the next command in the root of the project: > chmod +x ./utilities/assume-role.sh
Then run the next command to assume the role KubeAdmin: > ./utilities/assume-role.sh -s KubeAdmin -p ptest3 -d 28000 -a arn:aws:iam::350572149155:role/KubeAdmin
The argument p sets the profile that will be used to save the assumed credentials. The argument d will be used to set the expiration time of the credentials token.
Finally use the next command to configure kubectl > aws eks update-kubeconfig --name staging --profile ptest3 --region us-east-1