Using Console
Using CLI
gcloud container node-pools list --cluster [CLUSTER_NAME] --zone [ZONE]
gcloud container node-pools update [NODE_POOL_NAME] --cluster [CLUSTER_NAME] --zone [ZONE] --security-config enable-secure-boot
gcloud container node-pools describe [NODE_POOL_NAME] --cluster [CLUSTER_NAME] --zone [ZONE] | grep secureBoot
Using Python
import google.auth from google.cloud import container_v1
credentials, project_id = google.auth.default() client = container_v1.ClusterManagerClient(credentials=credentials)
project_id = 'your-project-id' zone = 'us-central1-a' cluster_id = 'your-cluster-id' response = client.list_node_pools(project_id, zone, cluster_id)
for node_pool in response.node_pools: if not node_pool.config.secure_boot: node_pool.config.secure_boot = True update_request = container_v1.types.UpdateNodePoolRequest( project_id=project_id, zone=zone, cluster_id=cluster_id, node_pool_id=node_pool.name, node_pool=node_pool.config, update_mask={'paths': ['config.secure_boot']} ) client.update_node_pool(update_request)