🌐
Kubernetes
kubernetes.io › docs › reference › kubectl › quick-reference
kubectl Quick Reference | Kubernetes
3 weeks ago - Will cause a service outage. kubectl replace --force -f ./pod.json # Create a service for a replicated nginx, which serves on port 80 and connects to the containers on port 8000 kubectl expose rc nginx --port=80 --target-port=8000 # Update a single-container pod's image version (tag) to v4 kubectl get pod mypod -o yaml | sed 's/\(image: myimage\):.*$/\1:v4/' | kubectl replace -f - kubectl label pods my-pod new-label=awesome # Add a Label kubectl label pods my-pod new-label- # Remove a label kubectl label pods my-pod new-label=new-value --overwrite # Overwrite an existing value kubectl annotate pods my-pod icon-url=http://goo.gl/XXBTWq # Add an annotation kubectl annotate pods my-pod icon-url- # Remove annotation kubectl autoscale deployment foo --min=2 --max=10 # Auto scale a deployment "foo"
🌐
GitHub
github.com › boto › boto3 › issues › 2095
Support for eks update-kubeconfig · Issue #2095 · boto/boto3
August 26, 2019 - Hello, it would be great if you could implement eks update-kubeconfig command https://docs.aws.amazon.com/cli/latest/reference/eks/update-kubeconfig.html Thanks
Author   Wuzyn
Discussions

role parameter in eks update-kubeconfig is not being used for aws cli connection
Describe the bug It seems that the role parameter in aws eks update-kubeconfig --role arn:aws:iam::1234567890:role/ASSUMEDROLE is only being inserted in to kube config and used for kubectl connecti... More on github.com
🌐 github.com
7
February 28, 2024
[Help] config created with eksctl utils write-kubeconfig vs. aws eks update-kubeconfig
kubectl v1.25.0 eksctl 0.116.0 aws-cli/2.8.7 Python/3.9.11 Windows/10 exe/AMD64 prompt/off It was long running eksctl create cluster -f ... partial log is below: 2022-11-02 12:48:57 [ℹ] waiting for the control plane to become ready 2022-... More on github.com
🌐 github.com
9
November 3, 2022
[Question/Feature Request] Update Existing .kube/config Instead of Overwriting
I believe it would be useful to have an "update_kubeconfig" mode where you just append the new context. Maybe run "aws eks --region $region update-kubeconfig --name $clusterName" or something similar? More on github.com
🌐 github.com
6
November 24, 2020
aws eks update-kubeconfig doesn't generate config with env var AWS_SHARED_CREDENTIALS_FILE
Describe the bug Hi, when running aws eks update-kubeconfig --kubeconfig example the environment variable (if set) AWS_SHARED_CREDENTIALS_FILE isn't appended to the generated kubeconfig, while ... More on github.com
🌐 github.com
4
March 6, 2023
🌐
Medium
medium.com › @1200km › cti-research-kubernetes-cloud-native-threat-landscape-70373d6d7a87
CTI Research: Kubernetes & Cloud-Native Threat Landscape | by Andrey Pautov | Apr, 2026 | Medium
1 week ago - Classification: TLP:WHITE — Unrestricted Distribution Author: Andrey Pautov Date: April 23, 2026 Assessment window: 2023 — Q2 2026 Evidence cutoff: April 23, 2026 (UTC) Audience: CISO, Detection Engineers, SOC Analysts (Tier 2–3), Cloud Security Architects Primary Sources: Sysdig TRT, Aqua Nautilus, Palo Alto Unit 42, Microsoft Threat Intelligence, CrowdStrike, NVD, AWS/Azure/GCP Documentation, SigmaHQ, Falco, Tetragon, CNCF
🌐
Kubernetes
kubernetes.io › docs › concepts › workloads › autoscaling › horizontal-pod-autoscale
Horizontal Pod Autoscaling | Kubernetes
March 15, 2026 - When an HPA is enabled, it is ... this isn't done, any time a change to that object is applied, for example via kubectl apply -f deployment.yaml, this will instruct Kubernetes to scale the current number of Pods to the value ...
🌐
GitHub
github.com › gumlet › aws-eks-action
GitHub - gumlet/aws-eks-action: Update .kube/config in a GitHub Action to connect to an AWS EKS Kubernetes cluster
- uses: gumlet/aws-eks-action@v1.0 with: # Name of the EKS cluster you want to access (required) cluster: '' # Name of the Kubernetes config context to create (default: EKS cluster name) context: '' # ARN of an IAM role to assign to cluster authentication role: '' # If 'true', the action will run use-context for the cluster's new context activate: 'false' - name: Configure AWS Credentials uses: aws-actions/configure-aws-credentials@v2 with: role-to-assume: arn:aws:iam::123456789100:role/my-github-actions-role aws-region: us-east-2 - name: Configure Kubernetes client uses: gumlet/aws-eks-action@v1.0 with: cluster: my-cluster-name - name: Deploy service run: | kubectl apply -f ./deployment.yml kubectl rollout status -f ./deployment.yml --timeout=15m
Author   gumlet
🌐
Kubernetes
kubernetes.io › docs › concepts › workloads › pods
Pods | Kubernetes
March 26, 2026 - If you change the pod template ... the updated template. For example, the StatefulSet controller ensures that the running Pods match the current pod template for each StatefulSet object....
🌐
GitHub
github.com › aws › aws-cli › issues › 8554
role parameter in eks update-kubeconfig is not being used for aws cli connection · Issue #8554 · aws/aws-cli
February 28, 2024 - Currently, I have to create a new AWS profile and specify the role_arn to ASSUMEDROLE and source as account A profile and run aws eks update-kubeconfig --name clusterB --role arn:aws:iam::ACCOUNTB#:role/ASSUMEDROLE --profile=NEWPROFILE to get ...
Author   xcompass
Find elsewhere
🌐
GitHub
github.com › deweysasser › eks-kubeconfig-update
GitHub - deweysasser/eks-kubeconfig-update: Update kubeconfig for all clusters reachable from all AWS profiles · GitHub
Usage: eks-kubeconfig-update Download kubeconfigs in bulk by examining clusters across multiple profiles and regions Flags: -h, --help Show context-sensitive help. --version Show program version Input -k, --kube-config="~/.kube/config" Kubeconfig file -c, --credentials-file="~/.aws/credentials" AWS Credentials File --regions=us-east-1,us-east-2,us-west-1,us-west-2,... List of regions to check ($AWS_REGIONS) --profiles=PROFILES,... List of AWS profiles to use.
Starred by 2 users
Forked by 3 users
Languages   Go 84.8% | Makefile 12.2% | Dockerfile 3.0%
🌐
GitHub
github.com › weaveworks › eksctl › issues › 5859
[Help] config created with eksctl utils write-kubeconfig vs. aws eks update-kubeconfig · Issue #5859 · eksctl-io/eksctl
November 3, 2022 - I wonder, why eksctl utils write-kubeconfig uses command: heptio-authenticator-aws which results in error Unable to connect to the server: getting credentials: decoding stdout: no kind "ExecCredential" is registered for version "client.authentication.k8s.io/v1alpha1" in scheme "pkg/client/auth/exec/exec.go:62" The config created with aws eks update-kubeconfig works fine with kubectl
Author   ecc256
🌐
GitHub
github.com › terraform-aws-modules › terraform-aws-eks › issues › 1120
[Question/Feature Request] Update Existing .kube/config Instead of Overwriting · Issue #1120 · terraform-aws-modules/terraform-aws-eks
November 24, 2020 - I believe it would be useful to have an "update_kubeconfig" mode where you just append the new context. Maybe run "aws eks --region $region update-kubeconfig --name $clusterName" or something similar?
Author   alexandrud
🌐
Kubernetes
kubernetes.io › docs › tasks › tools
Install Tools | Kubernetes
The Kubernetes command-line tool, kubectl, allows you to run commands against Kubernetes clusters. You can use kubectl to deploy applications, inspect and manage cluster resources, and view logs. For more information including a complete list of kubectl operations, see the kubectl reference ...
🌐
AWS CLI
awscli.amazonaws.com › v2 › documentation › api › 2.8.7 › reference › eks › update-kubeconfig.html
update-kubeconfig — AWS CLI 2.8.7 Command Reference
This example command updates the default kubeconfig file to use your cluster as the current context. Command: aws eks update-kubeconfig --name example · Output: Added new context arn:aws:eks:us-west-2:012345678910:cluster/example to /Users/ericn/.kube/config ·
🌐
DEV Community
dev.to › aws-builders › kubeconfig-for-eks-cluster-4aga
Kubeconfig for EKS Cluster - DEV Community
June 9, 2023 - Create kubeconfig file on ~/.kube/config location: $ aws eks update-kubeconfig --name <EKS_CLUSTER_NAME> \ --region <REGION_CODE>
Top answer
1 of 5
13

I needed to add my IAM user to the mapUsers section of the ConfigMap configmap/aws-auth, per these AWS docs.

You can edit the configmap using the same AWS user that initially created the cluster.

$ kubectl edit -n kube-system configmap/aws-auth

apiVersion: v1
data:
mapRoles: |
    - rolearn: arn:aws:iam::555555555555:role/devel-worker-nodes-NodeInstanceRole-74RF4UBDUKL6
    username: system:node:{{EC2PrivateDNSName}}
    groups:
        - system:bootstrappers
        - system:nodes
mapUsers: |
    - userarn: arn:aws:iam::555555555555:user/admin
    username: admin
    groups:
        - system:masters
    - userarn: arn:aws:iam::111122223333:user/ops-user
    username: ops-user
    groups:
        - system:masters
mapAccounts: |
    - "111122223333"
2 of 5
3

Unfortunately, AWS doesn't yet have a command like GKE's "gcloud container clusters get-credentials", which creates kubectl config for you. So, you need to create kubectl config file manually.

As mentioned in creating a kubeconfig for Amazon EKS document, you should get two things from the cluster:

  1. Retrieve the endpoint for your cluster. Use this for the <endpoint-url> in your kubeconfig file.

    aws eks describe-cluster --cluster-name <cluster-name>  --query cluster.endpoint
    
  2. Retrieve the certificateAuthority.data for your cluster. Use this for the <base64-encoded-ca-cert> in your kubeconfig file.

    aws eks describe-cluster --cluster-name <cluster-name>  --query cluster.certificateAuthority.data
    

Create the default kubectl folder if it does not already exist.

mkdir -p ~/.kube

Open your favorite text editor and paste the following kubeconfig code block into it.

apiVersion: v1
clusters:
- cluster:
    server: <endpoint-url>
    certificate-authority-data: <base64-encoded-ca-cert>
  name: kubernetes
contexts:
- context:
    cluster: kubernetes
    user: aws
  name: aws
current-context: aws
kind: Config
preferences: {}
users:
- name: aws
  user:
    exec:
      apiVersion: client.authentication.k8s.io/v1alpha1
      command: heptio-authenticator-aws
      args:
        - "token"
        - "-i"
        - "<cluster-name>"
        # - "-r"
        # - "<role-arn>"
      # env:
        # - name: AWS_PROFILE
        #   value: "<aws-profile>"

Replace the <endpoint-url> with the endpoint URL that was created for your cluster. Replace the <base64-encoded-ca-cert> with the certificateAuthority.data that was created for your cluster. Replace the <cluster-name> with your cluster name.

Save the file to the default kubectl folder, with your cluster name in the file name. For example, if your cluster name is devel, save the file to ~/.kube/config-devel.

Add that file path to your KUBECONFIG environment variable so that kubectl knows where to look for your cluster configuration.

export KUBECONFIG=$KUBECONFIG:~/.kube/config-devel

(Optional) Add the configuration to your shell initialization file so that it is configured when you open a shell.

For Bash shells on macOS:

echo 'export KUBECONFIG=$KUBECONFIG:~/.kube/config-devel' >> ~/.bash_profile

For Bash shells on Linux:

echo 'export KUBECONFIG=$KUBECONFIG:~/.kube/config-devel' >> ~/.bashrc

Test your configuration.

kubectl get svc

Output:

NAME             TYPE        CLUSTER-IP   EXTERNAL-IP   PORT(S)   AGE
svc/kubernetes   ClusterIP   10.100.0.1   <none>        443/TCP   1m

Note
If you receive the error "heptio-authenticator-aws": executable file not found in $PATH, then your kubectl is not configured for Amazon EKS. For more information, see Configure kubectl for Amazon EKS.

🌐
AWS
docs.aws.amazon.com › amazon eks › user guide › amazon eks cluster lifecycle and configuration › update existing cluster to new kubernetes version
Update existing cluster to new Kubernetes version - Amazon EKS
aws eks update-cluster-version --name <cluster-name> \ --kubernetes-version <version-number> --region <region-code> An example output is as follows.
🌐
Fig
fig.io › manual › aws › eks › update-cluster-config
aws eks update-cluster-config | Fig
Updates an Amazon EKS cluster configuration. Your cluster continues to function during the update. The response output includes an update ID that you can use to track the status of your cluster update with the DescribeUpdate API operation. You can use this API operation to enable or disable exporting the Kubernetes control plane logs for your cluster to CloudWatch Logs.
🌐
Medium
medium.com › @mb20261 › aws-cli-v2-by-examples-mastering-amazon-eks-management-with-kubectl-integration-a6096895ebfc
AWS CLI v2 by Examples: Mastering Amazon EKS Management with kubectl Integration | by MB20261 | Medium
April 10, 2025 - We will navigate multiple real-world scenarios that showcase the robust integration between AWS CLI and kubectl for managing Amazon EKS. We will demonstrate: Utilizing AWS CLI commands to generate and update necessary cluster configuration files.
🌐
GitHub
github.com › aws › aws-cli › issues › 7724
aws eks update-kubeconfig doesn't generate config with env var AWS_SHARED_CREDENTIALS_FILE · Issue #7724 · aws/aws-cli
March 6, 2023 - This causes failures in libraries that use this kubeconfig to authenticate (for example the python kubernetes client library). Expected to either cli set the environment var on the kubeconfig if exists or documentation warning. Currently the environment variable is read during the command but not written to the kubeconfig file output. export AWS_SHARED_CREDENTIALS_FILE="~/.aws/test.credentials" aws --region "something" --profile "something" eks update-kubeconfig --name "example-cluster" --kubeconfig kubeconfig unset AWS_SHARED_CREDENTIALS_FILE test.py
Author   zhnu