All skills
google avatar

/gke-basics

@9ad3d2b
by googlegoogle/skills21k stars
1,698

Manages core GKE cluster provisioning, credentials, Autopilot vs Standard selection, and workload deployment. Use when creating GKE clusters, fetching kubectl credentials, or deciding between Autopilot and Standard modes. Don't use for Workload Identity (use gke-workload-identity), GKE networking (use gke-networking), security hardening (use gke-platform-security or gke-workload-security), or cluster upgrades (use gke-upgrades).

Use this Skill: https://skilld.dev/gh/google/skills/gke-basics

This session only. Nothing lands on disk.

referencesiac-usage.md

≈535 tokens on demand. Your agent reads this file only when SKILL.md points to it.

GKE Infrastructure as Code

GKE resources, including clusters and Kubernetes objects, can be provisioned and managed using Terraform.

Terraform

Terraform uses two main providers for GKE:

  • The Google Cloud provider connects to the Google Cloud API to manage GKE cluster infrastructure using Terraform resources such as google_container_cluster for the cluster itself, and google_container_node_pool for nodes in Standard mode.
  • The Kubernetes provider connects to the Kubernetes API to manage workloads inside the cluster using Kubernetes resources such as Deployments and Services.

GKE Autopilot Cluster Example

resource "google_container_cluster" "primary" {
  name     = "my-gke-cluster"
  location = "us-central1"

  enable_autopilot = true

  # Do NOT specify node configurations (like initial_node_count or node_config)
  # in Autopilot mode; doing so causes a Terraform provider error.

  # Deletion protection should be set to false for testing
  deletion_protection = false
}

Deploying a Workload Example (Kubernetes Provider)

resource "kubernetes_deployment_v1" "default" {
  metadata {
    name = "hello-app"
  }
  spec {
    replicas = 2
    selector {
      match_labels = {
        app = "hello-app"
      }
    }
    template {
      metadata {
        labels = {
          app = "hello-app"
        }
      }
      spec {
        container {
          image = "us-docker.pkg.dev/google-samples/containers/gke/hello-app:2.0"
          name  = "hello-app"
        }
      }
    }
  }
}

Reference Documentation

YAML Samples

GKE cluster configurations and Kubernetes manifests can also be defined using YAML for use with kubectl apply or Deployment Manager.

Source: SKILL.md on GitHub

1 warning1d3 checks · Risk SAFE
  • Gen Agent Trust Hub1d

    This skill provides a comprehensive guide for managing Google Kubernetes Engine (GKE) clusters, following Google Cloud's established best practices for security and provisioning. It includes potential considerations regarding the handling of Kubernetes manifests and external libraries, which are standard for cloud infrastructure management tools.

  • Socket1d

    No alerts

  • Snyk1d

    Risk: MEDIUM · 1 issue

Signed by skilld at 9ad3d2b. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub yesterday.

Activeupdated 3 days ago
metadata
{
  "version": "1.1.1",
  "category": "Containers"
}

README badge

README badge for google/skills/gke-basics