Disabling kernel lockdown on Bottlerocket systems
Disabling kernel lockdown on Bottlerocket systems
By default, kernel lockdown is enabled on Bottlerocket systems. This can cause the OpenResty XRay Agent
to fail to load kernel modules properly. You can disable kernel lockdown with the following command:
Logging in to the admin container via SSH
- Log in to the admin container using SSH
- Execute
apiclient set kernel.lockdown=none
to turn off kernel.lockdown. - Restart the AWS EC2 instance
Login to the admin container through the console
If SSH is not enabled, you can log in to the console container as follows
- Log in to the AWS EC2 console
- Select the EC2 instance
- Select the Connect button in the upper right corner of the EC2 instance.
- Select the Session Manager tab
- Enter enter-admin-container
- run
apiclient set kernel.lockdown=none
to turn off kernel.lockdown - Restart the AWS EC2 instance
disable kernel lockdown by editing user data
- Log in to the AWS EC2 console
- Select the EC2 instance
- Select the
Actions
button for the instance. 4. - Select the
Instance settings
tab. 5. - Select the
Edit user data
button - Add the following configuration to the
User data
text box[settings.kernel] lockdown = “none”
- Start the AWS EC2 instance