Skip to main content

Triage and Remediation

Remediation

Using Console

To remediate the misconfiguration “Ensure Integrity Monitoring For Shielded GKE Nodes Is Enabled” for GCP using GCP console, you can follow the below steps:
  1. Open the Google Cloud Console and select the project where the GKE cluster is hosted.
  2. From the Navigation menu, select Kubernetes Engine and then Clusters.
  3. Select the GKE cluster you want to remediate.
  4. Click on the Edit button at the top of the page.
  5. In the Security section, click on the Shielded Nodes tab.
  6. Enable the Integrity Monitoring option by selecting the checkbox.
  7. Click on Save to apply the changes.
Once the above steps are completed, Integrity Monitoring will be enabled for the Shielded GKE Nodes in your GCP project, and the misconfiguration will be remediated.

To remediate the misconfiguration “Ensure Integrity Monitoring For Shielded GKE Nodes Is Enabled” for GCP using GCP CLI, you can follow these steps:
  1. Open the Cloud Shell from the GCP Console.
  2. Ensure that you have the necessary permissions to make changes to the GKE cluster.
  3. Run the following command to enable integrity monitoring for shielded GKE nodes:
Note: Replace [CLUSTER_NAME] with the name of your GKE cluster.
  1. Verify that integrity monitoring is enabled for shielded GKE nodes using the following command:
The output should be “true”, indicating that integrity monitoring is enabled for shielded GKE nodes.
  1. Repeat the above steps for all the GKE clusters in your GCP project.
By following these steps, you can remediate the misconfiguration “Ensure Integrity Monitoring For Shielded GKE Nodes Is Enabled” for GCP using GCP CLI.
To remediate the misconfiguration “Ensure Integrity Monitoring For Shielded GKE Nodes Is Enabled” in GCP using Python, you can follow the below steps:Step 1: Install the necessary libraries.
Step 2: Set up the authentication credentials for the GCP project.
Step 3: Import the necessary libraries.
Step 4: Create a client object for the Monitoring API.
Step 5: Define the necessary variables.
Step 6: Define the metric descriptor for the Shielded Instance Integrity Monitoring metric.
Step 7: Create the metric descriptor if it doesn’t already exist.
Step 8: Define the time range for the query.
Step 9: Define the query for the Shielded Instance Integrity Monitoring metric.
Step 10: Execute the query and check if the Shielded Instance Integrity Monitoring metric is enabled for all nodes.
These steps will help you remediate the misconfiguration “Ensure Integrity Monitoring For Shielded GKE Nodes Is Enabled” in GCP using Python.
If you manage node pools separately, set it there instead:
Enabling shielded_instance_config (or changing it) on an existing node pool will trigger node recreation/rolling upgrade, which is a disruptive change for workloads running on those nodes.For verification, terraform plan should show enable_integrity_monitoring changing from false (or being added) to true in the shielded_instance_config block of the affected node_config.