-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
EKS update-config should support naming the user with the passed in alias #5164
Comments
Here is an example loop command for setting up your kube config:
|
Hi @elijah-roberts, notifying the maintainer of this feature for a review. I can't provide an ETA, but will let you know when I hear back. |
@elijah-roberts Can you explain what you mean "There is already precedent for overriding the context name by passing an --alias."? Overall I think this makes a lot of sense. |
Nvm, I understand now. See the PR for my comments that perhaps we should use a |
@nckturner that is totally fair.. just added a |
I just ran into this while working on having two different role configurations for the same EKS cluster... When trying I add cluster with k8sDev role to kubeconfig:
Now, I add cluster with k8sAdmin role to kubeconfig:
What I expected to see in my kubeconfig, which I'm presently doing manually:
|
👋🏻 Hello folks. Just ran into this edge-case while trying to configure multiple kubectl contexts for the same cluster, backed by different aws profiles. Having existing kubeconfig Having either a Thank you! |
|
…k/lambda-layer-awscli (#24800) Bumps [awscli](https://github.com/aws/aws-cli) from 1.27.94 to 1.27.99. <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/aws/aws-cli/blob/develop/CHANGELOG.rst">awscli's changelog</a>.</em></p> <blockquote> <h1>1.27.99</h1> <ul> <li>api-change:<code>cloudwatch</code>: Update cloudwatch command to latest version</li> <li>api-change:<code>comprehend</code>: This release adds a new field (FlywheelArn) to the EntitiesDetectionJobProperties object. The FlywheelArn field is returned in the DescribeEntitiesDetectionJob and ListEntitiesDetectionJobs responses when the EntitiesDetection job is started with a FlywheelArn instead of an EntityRecognizerArn .</li> <li>api-change:<code>rds</code>: Added error code CreateCustomDBEngineVersionFault for when the create custom engine version for Custom engines fails.</li> </ul> <h1>1.27.98</h1> <ul> <li>enhancement:eks: Add user-alias argument to update-kubeconfig command. Implements <code>[#5164](aws/aws-cli#5164) <https://github.com/aws/aws-cli/issues/5164></code>__</li> <li>api-change:<code>batch</code>: This feature allows Batch to support configuration of ephemeral storage size for jobs running on FARGATE</li> <li>api-change:<code>chime-sdk-identity</code>: AppInstanceBots can be used to add a bot powered by Amazon Lex to chat channels. ExpirationSettings provides automatic resource deletion for AppInstanceUsers.</li> <li>api-change:<code>chime-sdk-media-pipelines</code>: This release adds Amazon Chime SDK call analytics. Call analytics include voice analytics, which provides speaker search and voice tone analysis. These capabilities can be used with Amazon Transcribe and Transcribe Call Analytics to generate machine-learning-powered insights from real-time audio.</li> <li>api-change:<code>chime-sdk-messaging</code>: ExpirationSettings provides automatic resource deletion for Channels.</li> <li>api-change:<code>chime-sdk-voice</code>: This release adds Amazon Chime SDK call analytics. Call analytics include voice analytics, which provides speaker search and voice tone analysis. These capabilities can be used with Amazon Transcribe and Transcribe Call Analytics to generate machine-learning-powered insights from real-time audio.</li> <li>api-change:<code>codeartifact</code>: Repository CreationTime is added to the CreateRepository and ListRepositories API responses.</li> <li>api-change:<code>guardduty</code>: Adds AutoEnableOrganizationMembers attribute to DescribeOrganizationConfiguration and UpdateOrganizationConfiguration APIs.</li> <li>api-change:<code>ivs-realtime</code>: Initial release of the Amazon Interactive Video Service RealTime API.</li> <li>api-change:<code>mediaconvert</code>: AWS Elemental MediaConvert SDK now supports passthrough of ID3v2 tags for audio inputs to audio-only HLS outputs.</li> <li>api-change:<code>sagemaker</code>: Amazon SageMaker Autopilot adds two new APIs - CreateAutoMLJobV2 and DescribeAutoMLJobV2. Amazon SageMaker Notebook Instances now supports the ml.geospatial.interactive instance type.</li> <li>api-change:<code>servicediscovery</code>: Reverted the throttling exception RequestLimitExceeded for AWS Cloud Map APIs introduced in SDK version 1.12.424 2023-03-09 to previous exception specified in the ErrorCode.</li> <li>api-change:<code>textract</code>: The AnalyzeDocument - Tables feature adds support for new elements in the API: table titles, footers, section titles, summary cells/tables, and table type.</li> </ul> <h1>1.27.97</h1> <ul> <li>api-change:<code>iam</code>: Documentation updates for AWS Identity and Access Management (IAM).</li> <li>api-change:<code>iottwinmaker</code>: This release adds support of adding metadata when creating a new scene or updating an existing scene.</li> <li>api-change:<code>networkmanager</code>: This release includes an update to create-transit-gateway-route-table-attachment, showing example usage for TransitGatewayRouteTableArn.</li> <li>api-change:<code>pipes</code>: This release improves validation on the ARNs in the API model</li> <li>api-change:<code>resiliencehub</code>: This release provides customers with the ability to import resources from within an EKS cluster and assess the resiliency of EKS cluster workloads.</li> <li>api-change:<code>ssm</code>: This Patch Manager release supports creating, updating, and deleting Patch Baselines for AmazonLinux2023, AlmaLinux.</li> </ul> <h1>1.27.96</h1> <ul> <li>api-change:<code>chime-sdk-messaging</code>: Amazon Chime SDK messaging customers can now manage streaming configuration for messaging data for archival and analysis.</li> <li>api-change:<code>cleanrooms</code>: GA Release of AWS Clean Rooms, Added Tagging Functionality</li> <li>api-change:<code>ec2</code>: This release adds support for AWS Network Firewall, AWS PrivateLink, and Gateway Load Balancers to Amazon VPC Reachability Analyzer, and it makes the path destination optional as long as a destination address in the filter at source is provided.</li> <li>api-change:<code>iotsitewise</code>: Provide support for tagging of data streams and enabling tag based authorization for property alias</li> <li>api-change:<code>mgn</code>: This release introduces the Import and export feature and expansion of the post-launch actions</li> </ul> <h1>1.27.95</h1> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/aws/aws-cli/commit/2b4cfe19e3043e8cab87e3c56f418d7ca423ddbb"><code>2b4cfe1</code></a> Merge branch 'release-1.27.99'</li> <li><a href="https://github.com/aws/aws-cli/commit/998ac886e9902bab55c11c642e2e04f3af7e365e"><code>998ac88</code></a> Bumping version to 1.27.99</li> <li><a href="https://github.com/aws/aws-cli/commit/42ec335320f492ff6fe984b21707f34b5cd49507"><code>42ec335</code></a> Update changelog based on model updates</li> <li><a href="https://github.com/aws/aws-cli/commit/5cccc2151bf754ad02e93fee8bf873f14b3fe524"><code>5cccc21</code></a> Merge pull request <a href="https://redirect.github.com/aws/aws-cli/issues/7774">#7774</a> from stealthycoin/enable-dependabot</li> <li><a href="https://github.com/aws/aws-cli/commit/5018d0afec9b6c3a042c96920b615748286a93b2"><code>5018d0a</code></a> Merge branch 'release-1.27.98'</li> <li><a href="https://github.com/aws/aws-cli/commit/2c2c0c4ec47e8fe25491d56e3e9d072b64cc71f3"><code>2c2c0c4</code></a> Merge branch 'release-1.27.98' into develop</li> <li><a href="https://github.com/aws/aws-cli/commit/be3a2f8427aff89cdd1e396f34f33540023d63b6"><code>be3a2f8</code></a> Bumping version to 1.27.98</li> <li><a href="https://github.com/aws/aws-cli/commit/075f5293b0508ead08a98bcbdc968cc8884395c5"><code>075f529</code></a> Update changelog based on model updates</li> <li><a href="https://github.com/aws/aws-cli/commit/ae12ad33ba1059eff0e575e11fbaddc40f72f057"><code>ae12ad3</code></a> Add the rest of cli v2 dependencies to dependabot config</li> <li><a href="https://github.com/aws/aws-cli/commit/dd48afaaa8b9e682579b1a35109d910ca78aae01"><code>dd48afa</code></a> Merge pull request <a href="https://redirect.github.com/aws/aws-cli/issues/5165">#5165</a> from elijah-roberts/feature/support-creating-usernam...</li> <li>Additional commits viewable in <a href="https://github.com/aws/aws-cli/compare/1.27.94...1.27.99">compare view</a></li> </ul> </details> <br /> [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=awscli&package-manager=pip&previous-version=1.27.94&new-version=1.27.99)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details>
Bumps [awscli](https://github.com/aws/aws-cli) from 1.27.94 to 1.27.99. <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/aws/aws-cli/blob/develop/CHANGELOG.rst">awscli's changelog</a>.</em></p> <blockquote> <h1>1.27.99</h1> <ul> <li>api-change:<code>cloudwatch</code>: Update cloudwatch command to latest version</li> <li>api-change:<code>comprehend</code>: This release adds a new field (FlywheelArn) to the EntitiesDetectionJobProperties object. The FlywheelArn field is returned in the DescribeEntitiesDetectionJob and ListEntitiesDetectionJobs responses when the EntitiesDetection job is started with a FlywheelArn instead of an EntityRecognizerArn .</li> <li>api-change:<code>rds</code>: Added error code CreateCustomDBEngineVersionFault for when the create custom engine version for Custom engines fails.</li> </ul> <h1>1.27.98</h1> <ul> <li>enhancement:eks: Add user-alias argument to update-kubeconfig command. Implements <code>[#5164](aws/aws-cli#5164) <https://github.com/aws/aws-cli/issues/5164></code>__</li> <li>api-change:<code>batch</code>: This feature allows Batch to support configuration of ephemeral storage size for jobs running on FARGATE</li> <li>api-change:<code>chime-sdk-identity</code>: AppInstanceBots can be used to add a bot powered by Amazon Lex to chat channels. ExpirationSettings provides automatic resource deletion for AppInstanceUsers.</li> <li>api-change:<code>chime-sdk-media-pipelines</code>: This release adds Amazon Chime SDK call analytics. Call analytics include voice analytics, which provides speaker search and voice tone analysis. These capabilities can be used with Amazon Transcribe and Transcribe Call Analytics to generate machine-learning-powered insights from real-time audio.</li> <li>api-change:<code>chime-sdk-messaging</code>: ExpirationSettings provides automatic resource deletion for Channels.</li> <li>api-change:<code>chime-sdk-voice</code>: This release adds Amazon Chime SDK call analytics. Call analytics include voice analytics, which provides speaker search and voice tone analysis. These capabilities can be used with Amazon Transcribe and Transcribe Call Analytics to generate machine-learning-powered insights from real-time audio.</li> <li>api-change:<code>codeartifact</code>: Repository CreationTime is added to the CreateRepository and ListRepositories API responses.</li> <li>api-change:<code>guardduty</code>: Adds AutoEnableOrganizationMembers attribute to DescribeOrganizationConfiguration and UpdateOrganizationConfiguration APIs.</li> <li>api-change:<code>ivs-realtime</code>: Initial release of the Amazon Interactive Video Service RealTime API.</li> <li>api-change:<code>mediaconvert</code>: AWS Elemental MediaConvert SDK now supports passthrough of ID3v2 tags for audio inputs to audio-only HLS outputs.</li> <li>api-change:<code>sagemaker</code>: Amazon SageMaker Autopilot adds two new APIs - CreateAutoMLJobV2 and DescribeAutoMLJobV2. Amazon SageMaker Notebook Instances now supports the ml.geospatial.interactive instance type.</li> <li>api-change:<code>servicediscovery</code>: Reverted the throttling exception RequestLimitExceeded for AWS Cloud Map APIs introduced in SDK version 1.12.424 2023-03-09 to previous exception specified in the ErrorCode.</li> <li>api-change:<code>textract</code>: The AnalyzeDocument - Tables feature adds support for new elements in the API: table titles, footers, section titles, summary cells/tables, and table type.</li> </ul> <h1>1.27.97</h1> <ul> <li>api-change:<code>iam</code>: Documentation updates for AWS Identity and Access Management (IAM).</li> <li>api-change:<code>iottwinmaker</code>: This release adds support of adding metadata when creating a new scene or updating an existing scene.</li> <li>api-change:<code>networkmanager</code>: This release includes an update to create-transit-gateway-route-table-attachment, showing example usage for TransitGatewayRouteTableArn.</li> <li>api-change:<code>pipes</code>: This release improves validation on the ARNs in the API model</li> <li>api-change:<code>resiliencehub</code>: This release provides customers with the ability to import resources from within an EKS cluster and assess the resiliency of EKS cluster workloads.</li> <li>api-change:<code>ssm</code>: This Patch Manager release supports creating, updating, and deleting Patch Baselines for AmazonLinux2023, AlmaLinux.</li> </ul> <h1>1.27.96</h1> <ul> <li>api-change:<code>chime-sdk-messaging</code>: Amazon Chime SDK messaging customers can now manage streaming configuration for messaging data for archival and analysis.</li> <li>api-change:<code>cleanrooms</code>: GA Release of AWS Clean Rooms, Added Tagging Functionality</li> <li>api-change:<code>ec2</code>: This release adds support for AWS Network Firewall, AWS PrivateLink, and Gateway Load Balancers to Amazon VPC Reachability Analyzer, and it makes the path destination optional as long as a destination address in the filter at source is provided.</li> <li>api-change:<code>iotsitewise</code>: Provide support for tagging of data streams and enabling tag based authorization for property alias</li> <li>api-change:<code>mgn</code>: This release introduces the Import and export feature and expansion of the post-launch actions</li> </ul> <h1>1.27.95</h1> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/aws/aws-cli/commit/2b4cfe19e3043e8cab87e3c56f418d7ca423ddbb"><code>2b4cfe1</code></a> Merge branch 'release-1.27.99'</li> <li><a href="https://github.com/aws/aws-cli/commit/998ac886e9902bab55c11c642e2e04f3af7e365e"><code>998ac88</code></a> Bumping version to 1.27.99</li> <li><a href="https://github.com/aws/aws-cli/commit/42ec335320f492ff6fe984b21707f34b5cd49507"><code>42ec335</code></a> Update changelog based on model updates</li> <li><a href="https://github.com/aws/aws-cli/commit/5cccc2151bf754ad02e93fee8bf873f14b3fe524"><code>5cccc21</code></a> Merge pull request <a href="https://redirect.github.com/aws/aws-cli/issues/7774">#7774</a> from stealthycoin/enable-dependabot</li> <li><a href="https://github.com/aws/aws-cli/commit/5018d0afec9b6c3a042c96920b615748286a93b2"><code>5018d0a</code></a> Merge branch 'release-1.27.98'</li> <li><a href="https://github.com/aws/aws-cli/commit/2c2c0c4ec47e8fe25491d56e3e9d072b64cc71f3"><code>2c2c0c4</code></a> Merge branch 'release-1.27.98' into develop</li> <li><a href="https://github.com/aws/aws-cli/commit/be3a2f8427aff89cdd1e396f34f33540023d63b6"><code>be3a2f8</code></a> Bumping version to 1.27.98</li> <li><a href="https://github.com/aws/aws-cli/commit/075f5293b0508ead08a98bcbdc968cc8884395c5"><code>075f529</code></a> Update changelog based on model updates</li> <li><a href="https://github.com/aws/aws-cli/commit/ae12ad33ba1059eff0e575e11fbaddc40f72f057"><code>ae12ad3</code></a> Add the rest of cli v2 dependencies to dependabot config</li> <li><a href="https://github.com/aws/aws-cli/commit/dd48afaaa8b9e682579b1a35109d910ca78aae01"><code>dd48afa</code></a> Merge pull request <a href="https://redirect.github.com/aws/aws-cli/issues/5165">#5165</a> from elijah-roberts/feature/support-creating-usernam...</li> <li>Additional commits viewable in <a href="https://github.com/aws/aws-cli/compare/1.27.94...1.27.99">compare view</a></li> </ul> </details> <br /> [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=awscli&package-manager=pip&previous-version=1.27.94&new-version=1.27.99)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details>
Is your feature request related to a problem? Please describe.
I have multiple aws role to k8s role mappings per cluster. The eks update-config command supports setting the
AWS_PROFILE
variable under the user config if you pass in--profile
. However, it defaults the username to the cluster arn, so if I do this with multiple roles it gets overwrittenDescribe the solution you'd like
There is already precedent for overriding the context name by passing an
--alias
. If I run the following:aws eks update-kubeconfig --name <clustername> --alias prod-admin --profile prod-admin-role
AND
aws eks update-kubeconfig --name <clustername> --alias prod-support --profile prod-support-role
I would like for the following config to be created:
This will allow me to simply run a command to loop through all my roles, list eks-clusters, and define contexts for each cluster and role.
Describe alternatives you've considered
I could create a separate utility to do this, but honestly even forking this repo and making the small change would be easier.
Additional context
I have this working locally, and it is a 2 line change to match existing functionality with context naming.
The text was updated successfully, but these errors were encountered: