オプション
家 Skill 安全 gke-security

gke-security

google/skills google/skills

Workload Identity、Secret Manager、RBAC、バイナリ認証、ネットワークポリシー、およびPodセキュリティ基準を活用して、Google Kubernetes Engine(GKE)クラスタのセキュリティを強化します。

...すべて拡張します
16
更新された時間 2026年9月3日

GKE のセキュリティ

このリファレンスでは、GKE クラスタのセキュリティ設定について説明します。ゴールデンパスでは、 デフォルトで強化されたセキュリティ態勢が適用されます。

MCP ツール: get_clustercheck_k8s_authget_k8s_resourceapply_k8s_manifestupdate_cluster

ゴールデンパスのセキュリティデフォルト設定

設定 ゴールデンパスの値 Day-0/1 備考
workloadIdentityConfig.workloadPool .svc.id.goog Day-0 Pod 向けのワークロード ID フェデレーション
secretManagerConfig.enabled true Day-1 Google Secret Manager との連携
secretManagerConfig.rotationConfig 有効: true、ローテーション間隔: 120秒 1日目 シークレットの自動ローテーション
rbacBindingConfig.enableInsecureBindingSystemAuthenticated false Day-0 レガシーシステムの「system:authenticated」バインディングをブロックする
rbacBindingConfig.enableInsecureBindingSystemUnauthenticated false Day-0 レガシーシステムをブロック:未認証のバインディング
nodeConfig.shieldedInstanceConfig.enableSecureBoot true Day-0 ブート整合性の検証
nodeConfig.shieldedInstanceConfig.enableIntegrityMonitoring true Day-0 ランタイムの整合性チェック
nodeConfig.workloadMetadataConfig.mode GKE_METADATA Day-0 レガシー メタデータ API をブロックし、ワークロード ID を強制適用する
プライベートクラスタ + Dataplane V2 の設定 gke-networkingスキルを参照 Day-0 プライベートノード、プライベートエンドポイントの適用、ADVANCED_DATAPATH

ワークロード ID フェデレーション

ワークロード ID は、ポッドが Google Cloud API にアクセスするための推奨される方法です。 これにより、静的なサービスアカウントキーが不要になります。

セットアップ

# 1. Google サービス アカウント (GSA) を作成する
gcloud iam service-accounts create \
  --project \
  --display-name "Workload Identity SA" \
  --quiet

# 2. GSA に IAM ロールを付与する
gcloud projects add-iam-policy-binding \
  --member "serviceAccount:@.iam.gserviceaccount.com" \
  --role "" \
  --quiet

# 3. Kubernetes サービスアカウント (KSA) を作成する
kubectl create namespace
kubectl create serviceaccount --namespace

# 4. KSA を GSA にバインドする
gcloud iam service-accounts add-iam-policy-binding \
  @.iam.gserviceaccount.com \
  --role roles/iam.workloadIdentityUser \
  --member "serviceAccount:.svc.id.goog[/]" \
  --quiet

# 5. KSA にアノテーションを付与する
kubectl annotate serviceaccount \
  --namespace \
  iam.gke.io/gcp-service-account=@.iam.gserviceaccount.com

テスト用ポッドについては、assets/workload-identity-pod.yaml を参照してください。

検証

kubectl run workload-identity-test \
  --image=gcr.io/google.com/cloudsdktool/cloud-sdk:slim \
  --serviceaccount= --namespace= \
  --rm -it -- gcloud auth list --quiet

Secret Manager との統合

この推奨構成では、Secret Manager の自動ローテーションが有効になります。シークレットは Kubernetes シークレットに同期されます。

# クラスタで Secret Manager が有効になっていることを確認する
gcloud container clusters describe --region \
  --format="value(secretManagerConfig.enabled)" \
  --quiet

# まだ有効になっていない場合は有効にする(Day-1の変更)
gcloud container clusters update --region \
  --enable-secret-manager \
  --secret-manager-rotation-interval=120s \
  --quiet

CSI ボリュームによるシークレットのマウント(導入例)

Secret Manager アドオンが有効になると、ワークロードは Secrets Store CSI ドライバーを使用して、シークレットを ボリュームとしてマウントできるようになります。これには 2 つの手順が必要です:

  1. Secret Manager から取得するシークレットを指定するために、 SecretProviderClassを定義します
  2. そのクラスを参照する Deployment内でボリュームをマウントします

[!重要]本番環境でのベストプラクティス: ワークロードの 統合(Secret Manager CSI など)を実証する際は、生のPodマニフェストではなく、 本番環境標準のDeploymentマニフェストを常に使用してください。

ステップ 1: SecretProviderClass を作成する

apiVersion: secrets-store.csi.x-k8s.io/v1
kind: SecretProviderClass
metadata:
  name: app-secrets-provider
  namespace: default
spec:
  provider: gke  # GKE マネージドプロバイダーを指定
  parameters:
    secrets: |
      - resourceName: "projects//secrets/db-password/versions/latest"
        fileName: "db-password.txt"

ステップ 2: デプロイメントにシークレットをマウントする

apiVersion: apps/v1
kind: Deployment
metadata:
  name: secure-app
  namespace: default
spec:
  replicas: 2
  selector:
    matchLabels:
      app: secure-app
  template:
    metadata:
      labels:
        app: secure-app
    spec:
      serviceAccountName: secure-ksa  # Secret ManagerのSecret Accessorロールを持つGSAにバインドされている必要があります
      containers:
      - name: app
        image:
        volumeMounts:
        - name: secrets-volume
          mountPath: "/var/secrets"
          readOnly: true
      volumes:
      - name: secrets-volume
        csi:
          driver: secrets-store.csi.k8s.io
          readOnly: true
          volumeAttributes:
            secretProviderClass: "app-secrets-provider"

RBACのセキュリティ強化

ゴールデンパスでは、system:authenticatedおよびsystem:unauthenticatedグループに広範なアクセス権を付与する、安全でないレガシー RBAC バインディングが無効化されます。

# セキュリティ上の問題があるバインディングが無効化されていることを確認する
gcloud container clusters describe --region \
  --format="yaml(rbacBindingConfig)" \
  --quiet

RBAC のベストプラクティス:

  • クラスタ全体の ClusterRole よりも、ネームスペーススコープの Role を使用する
  • 特定のグループまたはServiceAccountにバインドし、system:authenticatedには絶対にバインドしない
  • MCP による権限の監査:check_k8s_auth(parent="...", verb="list", resourceType="pods", namespace="...")(またはkubectl auth can-i --list --as=)
  • MCP を使用してバインディングを確認する:get_k8s_resource(parent="...", resourceType="clusterrolebinding")(またはkubectl get clusterrolebindings,rolebindings --all-namespaces)

エンタープライズ RBAC の計画については、gke-multitenancyスキルを参照してください。 https://docs.cloud.google.com/kubernetes-engine/docs/best-practices/rbac.md.txt

バイナリ認証

デフォルトではゴールデンパスでは有効になっていませんが、本番環境のイメージ 出所追跡には推奨されます:

# バイナリ認証を有効化
gcloud container clusters update --region \
  --binauthz-evaluation-mode=PROJECT_SINGLETON_POLICY_ENFORCE \
  --quiet

ネットワークポリシー

Dataplane V2(ゴールデンパス)には、組み込みのネットワークポリシー適用機能が備わっています。ネームスペースごとに デフォルト拒否(default-deny)を適用するには:

# MCP(推奨)
apply_k8s_manifest(parent="...", yamlManifest="")

# kubectl による代替方法
kubectl apply -f ./assets/default-deny-netpol.yaml -n

GKE Sandbox (gVisor)

隔離されたサンドボックス内で信頼できないワークロードを実行するには:

# クラスタで有効化(Standardクラスタ)
gcloud container clusters update --region --enable-gke-sandbox --quiet

# ポッド仕様での使用
# 追加: runtimeClassName: gvisor

Pod セキュリティ基準(ゴールデンパス)

Podセキュリティ基準では、Podの動作を制限する3つのプロファイルが定義されています。 restrictedプロファイル、本番用ネームスペースにおけるゴールデンパスのデフォルト設定です

プロファイル レベル ユースケース
特権 無制限 システムネームスペース (kube-system)、
: : : インフラストラクチャ・コントローラー :
ベースライン 制限が最小限 共有/dev ネームスペース、レガシーアプリ
: : : 移行中のアプリ :
制限あり ゴールデンパス 本番環境のワークロード -- ブロック
: : : 権限昇格、ホストへのアクセス、 :
: : : root :

ネームスペースラベルによる強制(Podセキュリティアドミッション):

apiVersion: v1
kind: Namespace
metadata:
  name: production
  labels:
    pod-security.kubernetes.io/enforce: restricted
    pod-security.kubernetes.io/warn: restricted
    pod-security.kubernetes.io/audit: restricted

段階的な導入戦略:

  1. 既存のネームスペースに対して警告監査を実施し、違反を特定することから開始する
  2. 準拠していないワークロードを修正する(privilegedhostNetwork、rootユーザーなどを削除する など)
  3. すべてのワークロードが基準を満たしたら、強制適用を有効化する

制限対象のブロック: root としての実行、特権昇格、ホスト ネットワーキング/PID/IPC、ホストパスボリューム、およびほとんどの機能。ゴールデンパスである workload-identity-pod.yamlはすでに準拠しています。

ネットワークポリシーのロギング(推奨)

Dataplane V2(ゴールデンパス)では、ネットワークポリシーの 判定に関するロギングを有効にできます。ゴールデンパスのデフォルト設定ではありませんが、セキュリティ監査のために推奨されます。

gcloud container clusters update --region \
  --enable-network-policy-logging \
  --quiet

これにより、許可および拒否された接続がログに記録され、ネットワーク ポリシールールのトラブルシューティングやトラフィックフローの監査に役立ちます。

一般的な IAM ロール

GKE で最も一般的な 5 つの事前定義済み IAM ロール:

ロール 目的 使用場面
roles/container.admin 以下の完全な制御権限 プラットフォームチームの管理者
: : クラスタおよび : クラスタの管理 :
: : Kubernetes : ライフサイクル :
: : リソース : :
roles/container.clusterAdmin クラスターを管理するが クラスターオペレーター
: : プロジェクトレベルではない : 作成・削除を行う :
: : IAM : クラスタ :
roles/container.developer ワークロードのデプロイ アプリケーション
: : (ポッド、サービス、 : デプロイを行う開発者 :
: : デプロイメント) : 既存のクラスターへ :
roles/container.viewer 監視への読み取り専用アクセス モニタリング、
: : クラスターおよび : 監査、または :
: : Kubernetes : 読み取り専用ダッシュボード :
: : リソース : :
roles/container.clusterViewer 一覧表示および取得 CI/CDパイプラインを
: : クラスタの詳細 : クラスタが必要 :
: : クラスタのみ : メタデータ :

最小権限の原則:最初はroles/container.viewerまたは roles/container.developerから始め、必要な場合にのみ権限を昇格させます。 roles/container.adminの権限を広く付与することは避けてください。

サービスアカウントとエージェント

  • GKE サービスエージェント (service-@container-engine-robot.iam.gserviceaccount.com): 自動的に作成されます。ユーザーに代わって、ノード、ネットワーク、およびクラスタの運用を 管理します。このアカウントの権限を削除または変更しないでください。
  • ノード サービス アカウント: デフォルトでは、ノードは Compute Engine のデフォルトの サービス アカウントを使用します。本番環境では、最小限の 権限を持つ専用のサービス アカウントを作成し、ノード プールの設定を通じて割り当ててください。
  • ワークロード ID: ポッドが Google Cloud API にアクセスするための推奨される方法です。Kubernetes の ServiceAccount を Google IAM の ServiceAccount にマッピングします。詳細は、 上記の「ワークロード ID の設定」を参照してください。

サービス間認証パターン

GKE ワークロードに他の Google Cloud サービスへのアクセス権を付与するための一般的なパターン:

# GKE ワークロードに Cloud Storage へのアクセス権を付与する
gcloud projects add-iam-policy-binding \
  --member "serviceAccount:@.iam.gserviceaccount.com" \
  --role "roles/storage.objectViewer" \
  --quiet

# GKE ワークロードに Cloud SQL へのアクセス権を付与する
gcloud projects add-iam-policy-binding \
  --member "serviceAccount:@.iam.gserviceaccount.com" \
  --role "roles/cloudsql.client" \
  --quiet

# GKE ワークロードに Pub/Sub へのアクセス権を付与する
gcloud projects add-iam-policy-binding \
  --member "serviceAccount:@.iam.gserviceaccount.com" \
  --role "roles/pubsub.subscriber" \
  --quiet

いずれの場合も、GSAはワークロード ID を通じて KSA にバインドされている必要があります(上記のセットアップを参照)。 その後、ポッドは KSA を使用して GSA として認証を行います。

GitHubで見る
---
name: gke-security
description: Hardens Google Kubernetes Engine (GKE) clusters with Workload Identity, Secret Manager, RBAC, Binary Authorization, Network Policies, and Pod Security Standards.
---

# GKE Security

This reference covers security configuration for GKE clusters. The golden path
enforces a hardened security posture by default.

> **MCP Tools:** `get_cluster`, `check_k8s_auth`, `get_k8s_resource`,
> `apply_k8s_manifest`, `update_cluster`

## Golden Path Security Defaults

Setting                                                        | Golden Path Value                       | Day-0/1 | Notes
-------------------------------------------------------------- | --------------------------------------- | ------- | -----
`workloadIdentityConfig.workloadPool`                          | `<PROJECT>.svc.id.goog`                 | Day-0   | Workload Identity Federation for Pods
`secretManagerConfig.enabled`                                  | `true`                                  | Day-1   | Google Secret Manager integration
`secretManagerConfig.rotationConfig`                           | `enabled: true, rotationInterval: 120s` | Day-1   | Automatic secret rotation
`rbacBindingConfig.enableInsecureBindingSystemAuthenticated`   | `false`                                 | Day-0   | Blocks legacy `system:authenticated` bindings
`rbacBindingConfig.enableInsecureBindingSystemUnauthenticated` | `false`                                 | Day-0   | Blocks legacy `system:unauthenticated` bindings
`nodeConfig.shieldedInstanceConfig.enableSecureBoot`           | `true`                                  | Day-0   | Verifiable boot integrity
`nodeConfig.shieldedInstanceConfig.enableIntegrityMonitoring`  | `true`                                  | Day-0   | Runtime integrity checks
`nodeConfig.workloadMetadataConfig.mode`                       | `GKE_METADATA`                          | Day-0   | Blocks legacy metadata API, enforces Workload Identity
Private cluster + Dataplane V2 settings                        | See the `gke-networking` skill          | Day-0   | Private nodes, private endpoint enforcement, ADVANCED_DATAPATH

## Workload Identity Federation

Workload Identity is the recommended way for pods to access Google Cloud APIs.
It eliminates the need for static service account keys.

### Setup

```bash
# 1. Create a Google Service Account (GSA)
gcloud iam service-accounts create <GSA_NAME> \
  --project <PROJECT_ID> \
  --display-name "Workload Identity SA" \
  --quiet

# 2. Grant IAM roles to the GSA
gcloud projects add-iam-policy-binding <PROJECT_ID> \
  --member "serviceAccount:<GSA_NAME>@<PROJECT_ID>.iam.gserviceaccount.com" \
  --role "<ROLE>" \
  --quiet

# 3. Create Kubernetes Service Account (KSA)
kubectl create namespace <NAMESPACE>
kubectl create serviceaccount <KSA_NAME> --namespace <NAMESPACE>

# 4. Bind KSA to GSA
gcloud iam service-accounts add-iam-policy-binding \
  <GSA_NAME>@<PROJECT_ID>.iam.gserviceaccount.com \
  --role roles/iam.workloadIdentityUser \
  --member "serviceAccount:<PROJECT_ID>.svc.id.goog[<NAMESPACE>/<KSA_NAME>]" \
  --quiet

# 5. Annotate KSA
kubectl annotate serviceaccount <KSA_NAME> \
  --namespace <NAMESPACE> \
  iam.gke.io/gcp-service-account=<GSA_NAME>@<PROJECT_ID>.iam.gserviceaccount.com
```

> See [assets/workload-identity-pod.yaml](./assets/workload-identity-pod.yaml)
> for a test pod.

### Verification

```bash
kubectl run workload-identity-test \
  --image=gcr.io/google.com/cloudsdktool/cloud-sdk:slim \
  --serviceaccount=<KSA_NAME> --namespace=<NAMESPACE> \
  --rm -it -- gcloud auth list --quiet
```

## Secret Manager Integration

The golden path enables Secret Manager with automatic rotation. Secrets are
synced to Kubernetes Secrets.

```bash
# Verify Secret Manager is enabled on cluster
gcloud container clusters describe <CLUSTER_NAME> --region <REGION> \
  --format="value(secretManagerConfig.enabled)" \
  --quiet

# Enable if not already (Day-1 change)
gcloud container clusters update <CLUSTER_NAME> --region <REGION> \
  --enable-secret-manager \
  --secret-manager-rotation-interval=120s \
  --quiet
```

### Mounting Secrets via CSI Volume (Deployment Example)

Once the Secret Manager add-on is enabled, workloads can mount secrets as
volumes using the Secrets Store CSI driver. This requires two steps:

1.  **Define a `SecretProviderClass`** to specify which secrets to retrieve from
    Secret Manager.
2.  **Mount the volume in a `Deployment`** referencing that class.

> [!IMPORTANT] **Production Best Practice**: Always demonstrate workload
> integrations (like Secret Manager CSI) using production-standard
> **`Deployment`** manifests rather than raw `Pod` manifests.

#### Step 1: Create the SecretProviderClass

```yaml
apiVersion: secrets-store.csi.x-k8s.io/v1
kind: SecretProviderClass
metadata:
  name: app-secrets-provider
  namespace: default
spec:
  provider: gke  # Identifies GKE managed provider
  parameters:
    secrets: |
      - resourceName: "projects/<PROJECT_ID>/secrets/db-password/versions/latest"
        fileName: "db-password.txt"
```

#### Step 2: Mount the secret in a Deployment

```yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: secure-app
  namespace: default
spec:
  replicas: 2
  selector:
    matchLabels:
      app: secure-app
  template:
    metadata:
      labels:
        app: secure-app
    spec:
      serviceAccountName: secure-ksa  # Must be bound to GSA with Secret Manager Secret Accessor role
      containers:
      - name: app
        image: <IMAGE>
        volumeMounts:
        - name: secrets-volume
          mountPath: "/var/secrets"
          readOnly: true
      volumes:
      - name: secrets-volume
        csi:
          driver: secrets-store.csi.k8s.io
          readOnly: true
          volumeAttributes:
            secretProviderClass: "app-secrets-provider"
```

## RBAC Hardening

The golden path disables insecure legacy RBAC bindings that grant broad access
to `system:authenticated` and `system:unauthenticated` groups.

```bash
# Verify insecure bindings are disabled
gcloud container clusters describe <CLUSTER_NAME> --region <REGION> \
  --format="yaml(rbacBindingConfig)" \
  --quiet
```

**Best practices for RBAC:**

-   Use namespace-scoped Roles over cluster-wide ClusterRoles
-   Bind to specific Groups or ServiceAccounts, never to `system:authenticated`
-   Audit permissions via MCP: `check_k8s_auth(parent="...", verb="list",
    resourceType="pods", namespace="...")` (or `kubectl auth can-i --list
    --as=<user>`)
-   Review bindings via MCP: `get_k8s_resource(parent="...",
    resourceType="clusterrolebinding")` (or `kubectl get
    clusterrolebindings,rolebindings --all-namespaces`)

> See the `gke-multitenancy` skill for enterprise RBAC planning and
> https://docs.cloud.google.com/kubernetes-engine/docs/best-practices/rbac.md.txt

## Binary Authorization

Not enabled in golden path by default but recommended for production image
provenance:

```bash
# Enable Binary Authorization
gcloud container clusters update <CLUSTER_NAME> --region <REGION> \
  --binauthz-evaluation-mode=PROJECT_SINGLETON_POLICY_ENFORCE \
  --quiet
```

## Network Policies

Dataplane V2 (golden path) provides built-in Network Policy enforcement. Apply
default-deny per namespace:

```
# MCP (preferred)
apply_k8s_manifest(parent="...", yamlManifest="<contents of default-deny-netpol.yaml>")

# kubectl fallback
kubectl apply -f ./assets/default-deny-netpol.yaml -n <NAMESPACE>
```

## GKE Sandbox (gVisor)

For running untrusted workloads in an isolated sandbox:

```bash
# Enable on cluster (Standard clusters)
gcloud container clusters update <CLUSTER_NAME> --region <REGION> --enable-gke-sandbox --quiet

# Use in pod spec
# Add: runtimeClassName: gvisor
```

## Pod Security Standards (Golden Path)

Pod Security Standards define three profiles that restrict what pods can do. The
**`restricted` profile is the golden path default** for production namespaces.

| Profile      | Level                 | Use Case                           |
| ------------ | --------------------- | ---------------------------------- |
| `privileged` | Unrestricted          | System namespaces (`kube-system`), |
:              :                       : infrastructure controllers         :
| `baseline`   | Minimally restrictive | Shared/dev namespaces, legacy apps |
:              :                       : being migrated                     :
| `restricted` | **Golden path**       | Production workloads -- blocks     |
:              :                       : privilege escalation, host access, :
:              :                       : root                               :

**Enforce via namespace labels (Pod Security Admission):**

```yaml
apiVersion: v1
kind: Namespace
metadata:
  name: production
  labels:
    pod-security.kubernetes.io/enforce: restricted
    pod-security.kubernetes.io/warn: restricted
    pod-security.kubernetes.io/audit: restricted
```

**Gradual rollout strategy:**

1.  Start with `warn` + `audit` on existing namespaces to identify violations
2.  Fix non-compliant workloads (remove `privileged`, `hostNetwork`, root user,
    etc.)
3.  Enable `enforce` once all workloads pass

`restricted` blocks: running as root, privilege escalation, host
networking/PID/IPC, host path volumes, and most capabilities. The golden path
`workload-identity-pod.yaml` already complies.

## Network Policy Logging (Recommended)

With Dataplane V2 (golden path), you can enable logging for Network Policy
decisions. **Not a golden path default** -- recommended for security auditing.

```bash
gcloud container clusters update <CLUSTER_NAME> --region <REGION> \
  --enable-network-policy-logging \
  --quiet
```

This logs allowed and denied connections, useful for troubleshooting Network
Policy rules and auditing traffic flows.

## Common IAM Roles

The five most common predefined IAM roles for GKE:

| Role                            | Purpose             | When to Use          |
| ------------------------------- | ------------------- | -------------------- |
| `roles/container.admin`         | Full control over   | Platform team admins |
:                                 : clusters and        : managing cluster     :
:                                 : Kubernetes          : lifecycle            :
:                                 : resources           :                      :
| `roles/container.clusterAdmin`  | Manage clusters but | Cluster operators    |
:                                 : not project-level   : who create/delete    :
:                                 : IAM                 : clusters             :
| `roles/container.developer`     | Deploy workloads    | Application          |
:                                 : (pods, services,    : developers deploying :
:                                 : deployments)        : to existing clusters :
| `roles/container.viewer`        | Read-only access to | Monitoring,          |
:                                 : clusters and        : auditing, or         :
:                                 : Kubernetes          : read-only dashboards :
:                                 : resources           :                      :
| `roles/container.clusterViewer` | List and get        | CI/CD pipelines that |
:                                 : cluster details     : need cluster         :
:                                 : only                : metadata             :

> **Principle of least privilege**: Start with `roles/container.viewer` or
> `roles/container.developer` and escalate only as needed. Avoid granting
> `roles/container.admin` broadly.

## Service Accounts & Agents

-   **GKE Service Agent**
    (`service-<PROJECT_NUMBER>@container-engine-robot.iam.gserviceaccount.com`):
    Automatically created. Manages nodes, networking, and cluster operations on
    your behalf. Do not remove or modify its permissions.
-   **Node Service Account**: By default, nodes use the Compute Engine default
    service account. For production, create a dedicated SA with minimal
    permissions and assign it via node pool config.
-   **Workload Identity**: The recommended way for pods to access Google Cloud
    APIs. Maps a Kubernetes ServiceAccount to a Google IAM ServiceAccount — see
    [Workload Identity setup](#workload-identity-federation) above.

## Cross-Service Authentication Patterns

Common patterns for granting GKE workloads access to other Google Cloud
services:

```bash
# Grant a GKE workload access to Cloud Storage
gcloud projects add-iam-policy-binding <PROJECT_ID> \
  --member "serviceAccount:<GSA_NAME>@<PROJECT_ID>.iam.gserviceaccount.com" \
  --role "roles/storage.objectViewer" \
  --quiet

# Grant a GKE workload access to Cloud SQL
gcloud projects add-iam-policy-binding <PROJECT_ID> \
  --member "serviceAccount:<GSA_NAME>@<PROJECT_ID>.iam.gserviceaccount.com" \
  --role "roles/cloudsql.client" \
  --quiet

# Grant a GKE workload access to Pub/Sub
gcloud projects add-iam-policy-binding <PROJECT_ID> \
  --member "serviceAccount:<GSA_NAME>@<PROJECT_ID>.iam.gserviceaccount.com" \
  --role "roles/pubsub.subscriber" \
  --quiet
```

In all cases, the GSA must be bound to a KSA via Workload Identity (see setup
above). The pod then uses the KSA to authenticate as the GSA.

すべてのファイル

0件のファイル

gke-securityをインストール

スキルファイルをダウンロードし、.claude/skills/ ディレクトリに解凍してください。

ZIPをダウンロード

リポジトリをクローンし、スキルファイルをプロジェクトにコピーしてください。

git clone https://github.com/google/skills/tree/main/skills/cloud/gke-security # Copy SKILL.md to your .claude/skills/ directory

コピー コピー
クイックセットアップ: スキルフォルダを .claude/skills/ にコピーしてください。 Claude が自動的にそのスキルを検出して使用します。
リポジトリ google/skills

関連スキル

gmgn-portfolio
更新された時間 2026年7月1日
zeroize-audit
更新された時間 2026年7月1日
device-integrity
更新された時間 2026年6月29日
flutter-use-http-package
更新された時間 2026年6月30日
OR