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

feat(al2023): install container-selinux for SELinux enforcing mode #2006

Open
jihed opened this issue Oct 14, 2024 · 2 comments
Open

feat(al2023): install container-selinux for SELinux enforcing mode #2006

jihed opened this issue Oct 14, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@jihed
Copy link

jihed commented Oct 14, 2024

What happened:
When enable SELINUX=enforcing mode on al2023. The nodeadm fails to run and the node couldn't join the cluster. I found that the EKS AMI is missing container-selinux rpm

What you expected to happen:
The EKS AMI with all flavor have the all the rpm needed for SELINUX enforcing mode.

How to reproduce it (as minimally and precisely as possible):
Deploy EKS cluster with node that have selinux with enforcing mode like in this: linux.
Environment:

  • AWS Region: Any region
  • Instance Type(s): Any
  • Cluster Kubernetes version: v1.31.0-eks-a737599
  • Node Kubernetes version:
  • AMI Version: Amazon Linux 2023.5.20240916
@jihed jihed added the bug Something isn't working label Oct 14, 2024
@cartermckinnon cartermckinnon added enhancement New feature or request and removed bug Something isn't working labels Oct 14, 2024
@cartermckinnon
Copy link
Member

AL2023 does not use The SELinux "enforcing" mode by default, that's why this package is not installed. If you want to enable enforcing mode on your nodes, you would need to install the necessary dependencies. If you want to open a PR to add some of this to the AMI, feel free 👍

@cartermckinnon cartermckinnon changed the title missing container-selinux rpm on EKS AMI - AL2023. feat(al2023): install container-selinux for SELinux enforcing mode Oct 14, 2024
@nmangalia
Copy link

nmangalia commented Oct 22, 2024

Thanks @jihed for opening this issue. Basically there is no AWS doc/guide which says that the package "container-selinux" must be installed if SELINUX is enabled in "Enforcing" mode.

In other word, the current AWS EKS AL2023 AMIs are not supporting SELINUX enforcing mode.

now, let's talk about just normal AL2023 base OS AMI. if any customer installs 'docker" with SELINUX enforcing mode, will it work? Since the problem is known to us, it is easy for us to fix it but if it is unknown to the customer who are using SELINUX enforcing mode (required by AL2023 CIS benchmark level 2), it will be a blocker.

In my opinion, to reduce the overall impact of current AL2023 AMI with SELINUX enforcing mode, we must have all the required package installed in the base OS AMI itself or we must say that if you are using SELINUX enforcing mode then these are the must packages.

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

No branches or pull requests

3 participants