出題比率 ~20%。Subnet 操作、ルーティング、NCC、GKE クラスタ実装の細部が問われます。
# 1. Custom-mode VPC
gcloud compute networks create prod-vpc \
--subnet-mode=custom \
--bgp-routing-mode=global --mtu=1500
# 2. Subnet + Secondary range for GKE + Flow logs + Private Google Access
gcloud compute networks subnets create prod-asia-ne1 \
--network=prod-vpc --region=asia-northeast1 --range=10.10.0.0/20 \
--secondary-range pods=10.20.0.0/14,services=10.30.0.0/20 \
--enable-private-ip-google-access \
--enable-flow-logs
# 3. IAP 用 SSH 許可 firewall
gcloud compute firewall-rules create allow-ssh-iap \
--network=prod-vpc --direction=INGRESS --action=ALLOW \
--rules=tcp:22 --source-ranges=35.235.240.0/20
35.235.240.0/20 を覚える。--next-hop-ilb + Health Check で自動フェイルオーバー。サードパーティ FW/IPS を inline で挟む典型構成です。
Google Cloud VPC を hub に。Peering の上位互換で transitive 可。Mesh / Star topology。
HA VPN / VLAN attachment / Router Appliance でオンプレ・他クラウド統合。
PSC endpoint propagation。マネージドサービスを集約。
gcloud container clusters create prod-cluster \
--region=asia-northeast1 \
--enable-ip-alias \
--network=prod-vpc --subnetwork=prod-asia-ne1 \
--cluster-secondary-range-name=pods \
--services-secondary-range-name=services \
--enable-private-nodes \
--enable-private-endpoint \
--master-ipv4-cidr=172.16.0.0/28 \
--master-authorized-networks=10.0.0.0/8 \
--enable-dataplane-v2 \
--enable-master-global-access
| Control Plane アクセス | 特徴 |
|---|---|
| Public endpoint + Authorized networks | シンプル、IP 制限 |
| Private endpoint + master global access | VPC 内専用、全リージョン到達 |
| DNS-based endpoint | 最新推奨。公開 IP 不要、IAM 認証 |