Prerequisites
Before you begin, ensure you have the following:
![image](https://lh7-rt.googleusercontent.com/docsz/AD_4nXfOFloHlEC4S_XeGjTL0oPAfHEDIwQflSvdVf-C-VC_UDlGCEWFfB-IkmJFA_bobexGDyosAa7gRrzdiLExmpdYpd3ZXJXjTn1dXfcs55IHjEXc7W9DfOlra3hWdDxpEnQarUuPlNE8F0qn818X_BHJTfhO?key=9bdr7KJ7zOf2PZvY5yWhvQ)
-
Install the kubectl command-line tool on your device or AWS CloudShell. Its version must match your cluster's Kubernetes version or be one minor version earlier or later.
-
An IAM user or role with permission to use the eks: DescribeCluster API action for the specified cluster.
Here are the steps to Create or Update kubeconfig:
![image](https://lh7-rt.googleusercontent.com/docsz/AD_4nXeBqkXkH8w78ioVagHrqw1tjfGnNMLAr9DIUksDlhezxeJXc7r7inqtPUjbk1Cc-wOZtFiRcZ8LQsmto1TlPawJOXnbIopC-P90YdwZJYJXTKYOSwmfVepyLg4QXu_8bVa_neSGIW3XLMP_3wiIAPWg08hE?key=9bdr7KJ7zOf2PZvY5yWhvQ)
Replace <region-code> with the AWS Region of your cluster and <my-cluster> with your cluster's name.
-
The default configuration file is saved at ~/.kube/config. To use a different path, specify with --kubeconfig.
-
To use a specific IAM role for authentication, add --role-arn. If not specified, the default AWS CLI credentials are used. Check your current identity by running this:
![image](https://lh7-rt.googleusercontent.com/docsz/AD_4nXemgHFxjx6AZsZTUgeHq6fvkzM3R0dw8fF5Vkf4gqN29Ez-RkD4HQeb-UhlXQPQvNG53kyXGufMwujiN7nTaaqv78mE3kDP-2h0-lfIrM8W-PD4rJ7qvSjSSt70Ql_NOPDi5w24ogOTAvK25kndwYB1Ao7v?key=9bdr7KJ7zOf2PZvY5yWhvQ)
![image](https://lh7-rt.googleusercontent.com/docsz/AD_4nXeiNMBRGmL1lLRa5F__qBxzFoOIpPO6Zl4Xo8AIGwD2kYaNK2oprpQu5iU2MjuoxAEj-gHcpasoV-VrrzrGWcRj_RzsRkYLQOMABxDXSeEuQAE0-DU3FgUuN8Du2X6jH1YCifizhEpCsLAbrqz2fBvHQO8?key=9bdr7KJ7zOf2PZvY5yWhvQ)
![image](https://lh7-rt.googleusercontent.com/docsz/AD_4nXe74InrYl-4gQ2p07uG279JFurAsuDuW_fvo9hRPql_a-0-vwViMlVO_o8g7u5JsM-klaZIfXM7TseUTTJa_PZzno3GCv_1nhoPQ5QPM-4FKeQBDRc2A2esI-gffnqyT_NjNEVK2_PcC9dSWLe7j858hB4D?key=9bdr7KJ7zOf2PZvY5yWhvQ)
![image](https://lh7-rt.googleusercontent.com/docsz/AD_4nXfQeeigRxBNpcVmbDwD8ukIOQwgEuvPF5qMm-GGcfTLwPD9xg3FOD-24WUYVNeNsAVYhgEXYKJUxW9PLUAErUbHxBx_10qkg_IrCKNiRegMdOPDTwZOCQsNEN_xmBy0qI_vS_Wcy8AxdjPy2m9QIlnZn6pv?key=9bdr7KJ7zOf2PZvY5yWhvQ)
For more information click here.