GCP Kubernetes Engine Clusters have Alpha cluster feature enabled misconfiguration detected in code
Rule Details
Cortex AppSec Rule ID
APPSEC2_GCP_19
Category - Subcategory
Kubernetes - Native Security Controls
Provider
GCP
Severity
LOW
Framework
Terraform, Terraform Plan
Mapped CSPM/KSPM Rule
7153b3ac-dc68-4f88-a981-db2992b81a80
Impact
The rule is checking to ensure that the 'alpha cluster' feature is disabled in Google Cloud Platform's (GCP) Kubernetes engine clusters. This is important because enabling the alpha cluster feature can present several potential issues.
First, it reduces stability: Alpha features are not stable and are likely to change in future Kubernetes versions, which can cause disruptions to the functioning of deployed applications. Second, it increases security risks: These features are not subject to the same level of scrutiny as stable API versions, so their usage can inadvertently expose the cluster to potential security vulnerabilities. Lastly, it can lead to poor resource management because some alpha features might consume more resources than stable features — leading to inefficiency and increased costs. For these reasons, it's important to disable the 'alpha cluster' feature in GCP Kubernetes engine clusters.
How to Fix
Resource: google_container_cluster
Arguments: enable_kubernetes_alpha
In order to fix the issue, you have to make sure that the 'enable_kubernetes_alpha' option is set to false for all GCP Kubernetes Engine Clusters. This can be done using the following Terraform code:
The above code makes sure that the 'alpha cluster' feature is disabled. Google GKE alpha clusters are based on the alpha version of the GKE API, which is not recommended for production use as it includes features that are not fully tested, and may undergo significant changes in terms of stability, security, and breaking changes. Therefore, production environments should always use GKE standard clusters which are stable and secure. [source,go]
resource "google_container_cluster" "my_cluster" { name = "my-cluster"
...
enable_kubernetes_alpha = false }
Last updated
Was this helpful?
