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

Kube2iam not assuming roles on kops #372

Open
craig-dsilva opened this issue Jan 26, 2024 · 3 comments
Open

Kube2iam not assuming roles on kops #372

craig-dsilva opened this issue Jan 26, 2024 · 3 comments

Comments

@craig-dsilva
Copy link

I have Kubernetes (v 1.28.4) running with Kops (v 1.28.1 previously running v1.19) on AWS. Recently we upgraded the cluster and kube2iam stopped working and is not assigning roles to the pods. I don't know what has gone wrong as it used to work with the previous version. Even the logs do not give me too much info.

@craig-dsilva craig-dsilva changed the title Kube2iam not assuming roles Kube2iam not assuming roles on kops Jan 26, 2024
@elliotdobson
Copy link

What version of kube2iam are you using?

As noted in the kOps v1.27 release notes:

As of Kubernetes version 1.27, all nodes will default to running with instance-metadata-service tokens required, with a max hop limit of 1. Newly created clusters will be configured as necessary to have these settings.

Which means that IMDSv2 is required in kOps Kubernetes v1.27+ clusters.

You can either:

  • Enable IMDSv1 as described here.
    OR
  • Upgrade to kube2iam v0.11.2 which (IIUC) supports IMDSv2.

@act-mreeves
Copy link

Sadly, nope. See #376.

Comparing 0.11.2 (latest release) to master shows the imdsV2 PR has not been added to a release: 0.11.2...master

@elliotdobson
Copy link

@act-mreeves the GitHub tags are misleading. There is discussion about misleading releases in #366 & #367.

Comparing 0.11.1...0.11.2 tags does not show the IMDSv2 feature (latest commit is 20/11/2023), however comparing 0.11.2...release-0.11.2 (tag/branch) it shows the IMDSv2 feature (latest commit is 27/11/2023).

The 0.11.2 docker image tag was last pushed on 27/11/2023. So IMDSv2 support is included in kube2iam v0.11.2 and I tested that to confirm.

We used the docker image as linked above to support IMDSv2 via kube2iam on a kOps v1.27+ cluster, which we have since migrated to IAM Roles for Service Accounts (IRSA).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants