Triage and Remediation
Remediation
Using Console
Using Console
To remediate the misconfiguration of EKS Clusters not having high availability in AWS, you can follow the below steps using the AWS console:
- Go to the Amazon EKS console.
- Select the EKS cluster that you want to remediate.
- Click on the “Configuration” tab.
- Under the “Networking” section, click on “Edit”.
- Ensure that the “Private networking only” option is unchecked.
- Under the “High availability” section, click on “Edit”.
- Select the “Multiple Availability Zones” option.
- Choose the number of availability zones you want to use.
- Click on “Save”.
- Wait for the changes to propagate.
Using CLI
Using CLI
To remediate the misconfiguration of EKS clusters not having high availability in AWS using AWS CLI, follow these steps:
- Open the AWS CLI and ensure that you have the necessary permissions to make changes to the EKS cluster.
-
Check if the EKS cluster is currently configured for high availability by running the following command:
This command will return a boolean value, where
true
indicates that the EKS cluster is configured for high availability, andfalse
indicates that it is not. -
If the EKS cluster is not configured for high availability, you can enable it by modifying the cluster’s endpoint access configuration using the following command:
This command will modify the EKS cluster’s endpoint access configuration to enable high availability.
-
Verify that the EKS cluster is now configured for high availability by running the
describe-cluster
command again and checking theendpointPublicAccess
value.This command should now returntrue
, indicating that the EKS cluster is configured for high availability. - Repeat these steps for any other EKS clusters that are not configured for high availability.
Using Python
Using Python
To remediate the misconfiguration of EKS Clusters not having high availability in AWS using Python, follow the steps below:Note: Replace ‘subnet-xxxxxxxx’, ‘subnet-yyyyyyyy’, ‘subnet-zzzzzzzz’ with the IDs of the subnets in which you want to launch your EKS worker nodes. These subnets should be in different availability zones to enable high availability.With these steps, you can remediate the misconfiguration of EKS clusters not having high availability in AWS using Python.
- Import the necessary AWS SDK modules in Python:
- Create a boto3 EKS client object:
- Get the EKS cluster name for which you want to enable high availability:
- Check if the EKS cluster is already highly available:
- If the EKS cluster is not highly available, update the cluster configuration to enable high availability:
- Verify that the EKS cluster is now highly available: