Deploying Daemonset Defenders in GKE Autopilot Cluster

Deploying Daemonset Defenders in GKE Autopilot Cluster

6235
Created On 04/28/23 20:14 PM - Last Modified 02/21/25 19:41 PM


Symptom


  • Defender pods get stuck in Pending state as the nodes don't have capacity to support that workload.
  • Often pod logs will reflect "GKE Policy Controller rejected the request because it violates one or more policies"


Environment


  • Prisma Cloud Compute (Self-hosted) all versions
    • Defenders
    • Google Kubernetes Engine (GKE) Autopilot
  • Prisma Cloud Enterprise Edition (SaaS)


Cause


  • GKE Autopilot is a mode of operation in GKE in which Google manages the cluster configuration, including nodes, scaling, security, and other preconfigured settings.  This automation can affect the deployment of nodes and their resource allocations.
 
  • GKE Autopilot limits some administrative functions that affect all workload Pods, including Pods managed by DaemonSets. DaemonSets that perform administrative functions on nodes using elevated privileges, such as the privileged security context, won't run on Autopilot clusters unless explicitly allowed by GKE.


Resolution


Best practices when deploying DaemonSets on Autopilot:

  • Ensure GKE Autopilot option is selected in Manage > Defenders > Deploy > Advanced Settings

image.png

  • Deploy DaemonSets before any other workloads.
  • Set a higher PriorityClass on DaemonSets than regular Pods.
    • The higher PriorityClass lets GKE evict lower-priority Pods to accommodate DaemonSet pods if the node can accommodate those pods.
    • This helps to ensure that the DaemonSet is present on each node. 
    • This requires manual addition to the deployment yaml file per the referenced documentation .


Additional Information




Actions
  • Print
  • Copy Link

    https://knowledgebase.paloaltonetworks.com/KCSArticleDetail?id=kA14u000000kHmZCAU&lang=en_US&refURL=http%3A%2F%2Fknowledgebase.paloaltonetworks.com%2FKCSArticleDetail