Skip to content
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

Parameter output = text blocks kubectl from working. #7723

Closed
robinpecha opened this issue Mar 6, 2023 · 5 comments
Closed

Parameter output = text blocks kubectl from working. #7723

robinpecha opened this issue Mar 6, 2023 · 5 comments
Assignees
Labels
bug This issue is a bug. eks-kubeconfig p1 This is a high priority issue

Comments

@robinpecha
Copy link

Describe the bug

After the last AWS-CLI upgrade, kubectl stopped working when you have parameter output = text in .aws/config

Expected Behavior

$ kubectl get ns
aws eks list-clusters
{
"clusters": [
"cluster-sandbox"
]
}
$ aws eks update-kubeconfig --name cluster-sandbox
Updated context arn:aws:eks:eu-west-2:123456789:cluster/cluster-sandbox in /home/devops/.kube/config
$ kubectl config current-context
arn:aws:eks:eu-west-2:123456789:cluster/cluster-sandbox
$ kubectl get namespace
NAME STATUS AGE
default Active 33d

Current Behavior

$ kubectl get ns
aws eks list-clusters
{
"clusters": [
"cluster-sandbox"
]
}
$ aws eks update-kubeconfig --name cluster-sandbox
Updated context arn:aws:eks:eu-west-2:123456789:cluster/cluster-sandbox in /home/devops/.kube/config
$ kubectl config current-context
arn:aws:eks:eu-west-2:123456789:cluster/cluster-sandbox
$ kubectl get namespace
Unable to connect to the server: getting credentials: decoding stdout: couldn't get version/kind; json parse error: json: cannot unmarshal string into Go value of type struct { APIVersion string "json:"apiVersion,omitempty""; Kind string "json:"kind,omitempty"" }

Reproduction Steps

Put in your .aws/config value output = text , update your kubeconfig and try to connect there:
$ aws eks update-kubeconfig --name cluster-sandbox
$ kubectl config current-context
$ kubectl get namespace

Possible Solution

Remove any output = text from .aws/config

Additional Information/Context

Versions:
Ubuntu 22.04.2 LTS
Linux 5.19.0-35-generic #36~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Fri Feb 17 15:17:25 UTC 2 x86_64 x86_64 x86_64
aws-cli/2.11.0 Python/3.11.2 Linux/5.19.0-35-generic exe/x86_64.ubuntu.22 prompt/off
kubectl: Client Version: version.Info{Major:"1", Minor:"26", GitVersion:"v1.26.2", ... GoVersion:"go1.19.6", ...
Kustomize Version: v4.5.7
Python 3.10.6

CLI version used

2.11

Environment details (OS name and version, etc.)

Ubuntu 22.04

@robinpecha robinpecha added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Mar 6, 2023
@tomups
Copy link

tomups commented Mar 6, 2023

Seeing the same issue in Windows 11, as well as Debian Bullseye in WSL2

@robinpecha
Copy link
Author

Ok, affected versions are 2.11.0 and 2.10.4
2.10.3 works fine.

@tim-finnigan
Copy link
Contributor

This issue should be fixed via the PR linked above (#7726). Those changes will be available in the next CLI release.

@tim-finnigan tim-finnigan added closing-soon This issue will automatically close in 4 days unless further comments are made. p1 This is a high priority issue and removed needs-triage This issue or PR still needs to be triaged. closing-soon This issue will automatically close in 4 days unless further comments are made. labels Mar 6, 2023
@github-actions
Copy link

github-actions bot commented Mar 6, 2023

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please open a new issue that references this one. If you wish to keep having a conversation with other community members under this issue feel free to do so.

@tim-finnigan
Copy link
Contributor

The fixed version for v1 will be out today and for v2 tomorrow. You will need to regenerate the config with update-kubeconfig again.

mergify bot pushed a commit to aws/aws-cdk that referenced this issue Mar 13, 2023
…k/lambda-layer-awscli (#24590)

Bumps [awscli](https://github.com/aws/aws-cli) from 1.27.84 to 1.27.89.
<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.89</h1>
<ul>
<li>api-change:<code>ivschat</code>: This release adds a new exception returned when calling AWS IVS chat UpdateLoggingConfiguration. Now UpdateLoggingConfiguration can return ConflictException when invalid updates are made in sequence to Logging Configurations.</li>
<li>api-change:<code>secretsmanager</code>: The type definitions of SecretString and SecretBinary now have a minimum length of 1 in the model to match the exception thrown when you pass in empty values.</li>
</ul>
<h1>1.27.88</h1>
<ul>
<li>api-change:<code>codeartifact</code>: This release introduces the generic package format, a mechanism for storing arbitrary binary assets. It also adds a new API, PublishPackageVersion, to allow for publishing generic packages.</li>
<li>api-change:<code>connect</code>: This release adds a new API, GetMetricDataV2, which returns metric data for Amazon Connect.</li>
<li>api-change:<code>evidently</code>: Updated entity override documentation</li>
<li>api-change:<code>networkmanager</code>: This update provides example usage for TransitGatewayRouteTableArn.</li>
<li>api-change:<code>quicksight</code>: This release has two changes: add state persistence feature for embedded dashboard and console in GenerateEmbedUrlForRegisteredUser API; add properties for hidden collapsed row dimensions in PivotTableOptions.</li>
<li>api-change:<code>redshift-data</code>: Added support for Redshift Serverless workgroup-arn wherever the WorkgroupName parameter is available.</li>
<li>api-change:<code>sagemaker</code>: Amazon SageMaker Inference now allows SSM access to customer's model container by setting the &quot;EnableSSMAccess&quot; parameter for a ProductionVariant in CreateEndpointConfig API.</li>
<li>api-change:<code>servicediscovery</code>: Updated all AWS Cloud Map APIs to provide consistent throttling exception (RequestLimitExceeded)</li>
<li>api-change:<code>sesv2</code>: This release introduces a new recommendation in Virtual Deliverability Manager Advisor, which detects missing or misconfigured Brand Indicator for Message Identification (BIMI) DNS records for customer sending identities.</li>
</ul>
<h1>1.27.87</h1>
<ul>
<li>api-change:<code>athena</code>: A new field SubstatementType is added to GetQueryExecution API, so customers have an error free way to detect the query type and interpret the result.</li>
<li>api-change:<code>dynamodb</code>: Adds deletion protection support to DynamoDB tables. Tables with deletion protection enabled cannot be deleted. Deletion protection is disabled by default, can be enabled via the CreateTable or UpdateTable APIs, and is visible in TableDescription. This setting is not replicated for Global Tables.</li>
<li>api-change:<code>ec2</code>: Introducing Amazon EC2 C7g, M7g and R7g instances, powered by the latest generation AWS Graviton3 processors and deliver up to 25% better performance over Graviton2-based instances.</li>
<li>api-change:<code>lakeformation</code>: This release adds two new API support &quot;GetDataCellsFiler&quot; and &quot;UpdateDataCellsFilter&quot;, and also updates the corresponding documentation.</li>
<li>api-change:<code>mediapackage-vod</code>: This release provides the date and time VOD resources were created.</li>
<li>api-change:<code>mediapackage</code>: This release provides the date and time live resources were created.</li>
<li>api-change:<code>route53resolver</code>: Add dual-stack and IPv6 support for Route 53 Resolver Endpoint,Add IPv6 target IP in Route 53 Resolver Forwarding Rule</li>
<li>api-change:<code>sagemaker</code>: There needs to be a user identity to specify the SageMaker user who perform each action regarding the entity. However, these is a not a unified concept of user identity across SageMaker service that could be used today.</li>
</ul>
<h1>1.27.86</h1>
<ul>
<li>bugfix:eks: Output JSON only for user entry in kubeconfig fixes <code>[#7719](aws/aws-cli#7719) &lt;https://github.com/aws/aws-cli/issues/7719&gt;</code><strong>, fixes <code>[#7723](aws/aws-cli#7723) &lt;https://github.com/aws/aws-cli/issues/7723&gt;</code></strong>, fixes <code>[#7724](aws/aws-cli#7724) &lt;https://github.com/aws/aws-cli/issues/7724&gt;</code>__</li>
<li>api-change:<code>dms</code>: This release adds DMS Fleet Advisor Target Recommendation APIs and exposes functionality for DMS Fleet Advisor. It adds functionality to start Target Recommendation calculation.</li>
<li>api-change:<code>location</code>: Documentation update for the release of 3 additional map styles for use with Open Data Maps: Open Data Standard Dark, Open Data Visualization Light &amp; Open Data Visualization Dark.</li>
</ul>
<h1>1.27.85</h1>
<ul>
<li>api-change:<code>account</code>: AWS Account alternate contact email addresses can now have a length of 254 characters and contain the character &quot;|&quot;.</li>
<li>api-change:<code>ivs</code>: Updated text description in DeleteChannel, Stream, and StreamSummary.</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="https://github.com/aws/aws-cli/commit/df68d39f402e023dd0ee48e6974eda850b4bbb21"><code>df68d39</code></a> Merge branch 'release-1.27.89'</li>
<li><a href="https://github.com/aws/aws-cli/commit/be4afd12701baadf08a343553b99975a2c02b7a0"><code>be4afd1</code></a> Bumping version to 1.27.89</li>
<li><a href="https://github.com/aws/aws-cli/commit/9583dc5226fdd93d752bcf319736af7c42602963"><code>9583dc5</code></a> Update changelog based on model updates</li>
<li><a href="https://github.com/aws/aws-cli/commit/7808d95fb9d1d99e0e0088132296e96d99a6a958"><code>7808d95</code></a> Merge branch 'release-1.27.88'</li>
<li><a href="https://github.com/aws/aws-cli/commit/7e4d04f4e522737ba951995886fe58e33a410ca3"><code>7e4d04f</code></a> Merge branch 'release-1.27.88' into develop</li>
<li><a href="https://github.com/aws/aws-cli/commit/7b64318189b3a3f2369885122b3249a961930b62"><code>7b64318</code></a> Bumping version to 1.27.88</li>
<li><a href="https://github.com/aws/aws-cli/commit/1c8486baccbfe705230ccf87850f8dfe5aba7ff3"><code>1c8486b</code></a> Update changelog based on model updates</li>
<li><a href="https://github.com/aws/aws-cli/commit/b40f487fa9a27ccf00e93e480bd7f73419d5f66a"><code>b40f487</code></a> Merge branch 'release-1.27.87'</li>
<li><a href="https://github.com/aws/aws-cli/commit/19b76b4b57f86ed4b6341a353d56cacf4f3582fd"><code>19b76b4</code></a> Merge branch 'release-1.27.87' into develop</li>
<li><a href="https://github.com/aws/aws-cli/commit/753b87077b1a8d21082cf2de1e48e9f4eec22352"><code>753b870</code></a> Bumping version to 1.27.87</li>
<li>Additional commits viewable in <a href="https://github.com/aws/aws-cli/compare/1.27.84...1.27.89">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.84&new-version=1.27.89)](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>
mergify bot pushed a commit to cdklabs/awscdk-asset-awscli that referenced this issue Mar 13, 2023
Bumps [awscli](https://github.com/aws/aws-cli) from 1.27.84 to 1.27.89.
<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.89</h1>
<ul>
<li>api-change:<code>ivschat</code>: This release adds a new exception returned when calling AWS IVS chat UpdateLoggingConfiguration. Now UpdateLoggingConfiguration can return ConflictException when invalid updates are made in sequence to Logging Configurations.</li>
<li>api-change:<code>secretsmanager</code>: The type definitions of SecretString and SecretBinary now have a minimum length of 1 in the model to match the exception thrown when you pass in empty values.</li>
</ul>
<h1>1.27.88</h1>
<ul>
<li>api-change:<code>codeartifact</code>: This release introduces the generic package format, a mechanism for storing arbitrary binary assets. It also adds a new API, PublishPackageVersion, to allow for publishing generic packages.</li>
<li>api-change:<code>connect</code>: This release adds a new API, GetMetricDataV2, which returns metric data for Amazon Connect.</li>
<li>api-change:<code>evidently</code>: Updated entity override documentation</li>
<li>api-change:<code>networkmanager</code>: This update provides example usage for TransitGatewayRouteTableArn.</li>
<li>api-change:<code>quicksight</code>: This release has two changes: add state persistence feature for embedded dashboard and console in GenerateEmbedUrlForRegisteredUser API; add properties for hidden collapsed row dimensions in PivotTableOptions.</li>
<li>api-change:<code>redshift-data</code>: Added support for Redshift Serverless workgroup-arn wherever the WorkgroupName parameter is available.</li>
<li>api-change:<code>sagemaker</code>: Amazon SageMaker Inference now allows SSM access to customer's model container by setting the &quot;EnableSSMAccess&quot; parameter for a ProductionVariant in CreateEndpointConfig API.</li>
<li>api-change:<code>servicediscovery</code>: Updated all AWS Cloud Map APIs to provide consistent throttling exception (RequestLimitExceeded)</li>
<li>api-change:<code>sesv2</code>: This release introduces a new recommendation in Virtual Deliverability Manager Advisor, which detects missing or misconfigured Brand Indicator for Message Identification (BIMI) DNS records for customer sending identities.</li>
</ul>
<h1>1.27.87</h1>
<ul>
<li>api-change:<code>athena</code>: A new field SubstatementType is added to GetQueryExecution API, so customers have an error free way to detect the query type and interpret the result.</li>
<li>api-change:<code>dynamodb</code>: Adds deletion protection support to DynamoDB tables. Tables with deletion protection enabled cannot be deleted. Deletion protection is disabled by default, can be enabled via the CreateTable or UpdateTable APIs, and is visible in TableDescription. This setting is not replicated for Global Tables.</li>
<li>api-change:<code>ec2</code>: Introducing Amazon EC2 C7g, M7g and R7g instances, powered by the latest generation AWS Graviton3 processors and deliver up to 25% better performance over Graviton2-based instances.</li>
<li>api-change:<code>lakeformation</code>: This release adds two new API support &quot;GetDataCellsFiler&quot; and &quot;UpdateDataCellsFilter&quot;, and also updates the corresponding documentation.</li>
<li>api-change:<code>mediapackage-vod</code>: This release provides the date and time VOD resources were created.</li>
<li>api-change:<code>mediapackage</code>: This release provides the date and time live resources were created.</li>
<li>api-change:<code>route53resolver</code>: Add dual-stack and IPv6 support for Route 53 Resolver Endpoint,Add IPv6 target IP in Route 53 Resolver Forwarding Rule</li>
<li>api-change:<code>sagemaker</code>: There needs to be a user identity to specify the SageMaker user who perform each action regarding the entity. However, these is a not a unified concept of user identity across SageMaker service that could be used today.</li>
</ul>
<h1>1.27.86</h1>
<ul>
<li>bugfix:eks: Output JSON only for user entry in kubeconfig fixes <code>[#7719](aws/aws-cli#7719) &lt;https://github.com/aws/aws-cli/issues/7719&gt;</code><strong>, fixes <code>[#7723](aws/aws-cli#7723) &lt;https://github.com/aws/aws-cli/issues/7723&gt;</code></strong>, fixes <code>[#7724](aws/aws-cli#7724) &lt;https://github.com/aws/aws-cli/issues/7724&gt;</code>__</li>
<li>api-change:<code>dms</code>: This release adds DMS Fleet Advisor Target Recommendation APIs and exposes functionality for DMS Fleet Advisor. It adds functionality to start Target Recommendation calculation.</li>
<li>api-change:<code>location</code>: Documentation update for the release of 3 additional map styles for use with Open Data Maps: Open Data Standard Dark, Open Data Visualization Light &amp; Open Data Visualization Dark.</li>
</ul>
<h1>1.27.85</h1>
<ul>
<li>api-change:<code>account</code>: AWS Account alternate contact email addresses can now have a length of 254 characters and contain the character &quot;|&quot;.</li>
<li>api-change:<code>ivs</code>: Updated text description in DeleteChannel, Stream, and StreamSummary.</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="https://github.com/aws/aws-cli/commit/df68d39f402e023dd0ee48e6974eda850b4bbb21"><code>df68d39</code></a> Merge branch 'release-1.27.89'</li>
<li><a href="https://github.com/aws/aws-cli/commit/be4afd12701baadf08a343553b99975a2c02b7a0"><code>be4afd1</code></a> Bumping version to 1.27.89</li>
<li><a href="https://github.com/aws/aws-cli/commit/9583dc5226fdd93d752bcf319736af7c42602963"><code>9583dc5</code></a> Update changelog based on model updates</li>
<li><a href="https://github.com/aws/aws-cli/commit/7808d95fb9d1d99e0e0088132296e96d99a6a958"><code>7808d95</code></a> Merge branch 'release-1.27.88'</li>
<li><a href="https://github.com/aws/aws-cli/commit/7e4d04f4e522737ba951995886fe58e33a410ca3"><code>7e4d04f</code></a> Merge branch 'release-1.27.88' into develop</li>
<li><a href="https://github.com/aws/aws-cli/commit/7b64318189b3a3f2369885122b3249a961930b62"><code>7b64318</code></a> Bumping version to 1.27.88</li>
<li><a href="https://github.com/aws/aws-cli/commit/1c8486baccbfe705230ccf87850f8dfe5aba7ff3"><code>1c8486b</code></a> Update changelog based on model updates</li>
<li><a href="https://github.com/aws/aws-cli/commit/b40f487fa9a27ccf00e93e480bd7f73419d5f66a"><code>b40f487</code></a> Merge branch 'release-1.27.87'</li>
<li><a href="https://github.com/aws/aws-cli/commit/19b76b4b57f86ed4b6341a353d56cacf4f3582fd"><code>19b76b4</code></a> Merge branch 'release-1.27.87' into develop</li>
<li><a href="https://github.com/aws/aws-cli/commit/753b87077b1a8d21082cf2de1e48e9f4eec22352"><code>753b870</code></a> Bumping version to 1.27.87</li>
<li>Additional commits viewable in <a href="https://github.com/aws/aws-cli/compare/1.27.84...1.27.89">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.84&new-version=1.27.89)](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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a bug. eks-kubeconfig p1 This is a high priority issue
Projects
None yet
Development

No branches or pull requests

3 participants