How Do You Use the aws update-kubeconfig Command?

Problem scenario
You want to manage your Amazon Kubernetes (i.e., EKS) cluster. You have installed the AWS CLI version on a Linux server, and you want to use the update-config or update-kubeconfig command.

But when you try you see messages like "error argument command: Invalid choice…" or "update-config: command not found". You could not readily find an example. What should you do?

The command is update-kubeconfig, not update-config.

1. Verify you have a version of the AWS CLI at or higher than 1.16. Use this command: aws --version
To install a newer version, see this set of directions if you can install pip; if you cannot install pip, see this set of directions.

2. Use this syntax (where foobar is the name of the cluster you want to create the configuration file for):
aws eks update-kubeconfig --name foobar

(If you need to find the name of your cluster(s), run this command: aws eks list-clusters)

Leave a comment

Your email address will not be published. Required fields are marked *