Member-only story
DNS管理を使ってKubernetesアプリケーションのデプロイメントをする方法(後半)
18 min readJun 11, 2020
今回の記事は長いので2回に分けてお送りしています。今回は後半です。デモクラスターの設定やイングレスなどについて詳しく説明します。
Demo Cluster Setup
デフォルトのクラスターデモクラスターの作成です。 潜在的に現在のクラスターであるNode-Poolに付属するスコープ権限に注意してください。ただし、CloudDNS RWが必要です。これがない場合には、新しいNode-Poolを作成する必要があります。 頑張ってください!
ただし、デモをシンプルにするために、すべての権限スコープを許可しますが、ニーズに合わせて「最小特権要件」への権限を削減する必要があります。
A basic, default spec 2 node cluster with preemptible nodesgcloud beta container --project "$PROJECT" clusters create "$CLUSTER_NAME" \--zone "us-central1-a" --no-enable-basic-auth \--cluster-version "1.14.6-gke.2" --machine-type "n1-standard-2" \--image-type "COS" --disk-type "pd-ssd" --disk-size "50" \--metadata disable-legacy-endpoints=true \--scopes "https://www.googleapis.com/auth/cloud-platform" \--preemptible --num-nodes "2" \--enable-cloud-logging \--enable-stackdriver-kubernetes --enable-ip-alias \--network "projects/$PROJECT/global/networks/default" \--subnetwork "projects/$PROJECT/regions/us-central1/subnetworks/default" \--default-max-pods-per-node "110" --addons HorizontalPodAutoscaling,HttpLoadBalancing \--enable-autoupgrade \--enable-autorepair