Devopszones provides latest guides,how-tos,troubleshooting and tutorials on Devops,Kubernetes,zabbix,cacti,Nagios,Linux,AIX,Solaris,Kafka,Elasticsearch,cloud, automation and Cluster.
AWS: How to Manage multiple EKS clusters From Command Line
Sometimes managing multiple Kubernetes clusters will be a pain. This setup might help you reduce that Confusion. This will be handy to know how to conveniently use context-switch between them in the same command line.
1. Authenticate to AWS CLI
First, let's authenticate to the AWS CLI:
#aws configure
2. List and Connect to an EKS cluster using the AWS CLI
Great, we're authenticated with the CLI, now we need to list the clusters.
# aws eks list-clusters
3. Targeting your cluster with config get-contexts and use-context
Using "kubectl config get-contexts" we'll be able to see all the clusters we've authenticated against:
#kubectl config get-contexts
You can see that the first one in my list is marked with the asterisk *. This is the cluster that is currently selected and that my kubectl commands targets.
To Switch cluster:
#kubectl config use-context <yourClusterName>
Now you're targeting the other cluster.
4. Add Aliases
Adding aliases will make things easier and you can remember it easily too.
This creates the alias with the name you specify for "ALIAS", which then executes the command I specified above. I then did the same for some other clusters I wanted quick access to.
It must be annoying that you bought the new Lenovo Ideapad 330 with ubuntu and you find out that the touchpad is not working. However the...
Subscribe Us
Please Support this website
If my website has helped you, then please consider supporting it....
You can support it by making a donation Or you can configure your ad blocker to make an exception for my website.
Thanks in advance....
No comments