説明
各ノードプールの定期更新を有効にするには、management.auto_upgrade = true を指定します。Google プロバイダーの既定値も true です。無効にした場合も GKE はコントロールプレーンを更新し、サポートが終了したノードをアップグレードすることがあります。
想定される影響
手動パッチが遅れると、既知の問題が残ったり、ノードとコントロールプレーンのバージョンに互換性がなくなったりします。
対処方法
各ノードプールの実際の設定とバージョンを確認します。メンテナンス時間を決め、ノードの置き換え中もワークロードを利用できるかテストしてください。手動で管理するプールでは担当者と更新日程を決め、サポート終了前にパッチを適用します。
例
例で変更するのは同じノードプールの auto_upgrade だけです。参照する google_container_cluster.primary と環境に必要な設定を別途用意してください。
変更前
hcl
resource "google_container_node_pool" "node_pool" {
name = "my-node-pool"
location = "us-central1-a"
cluster = google_container_cluster.primary.name
node_count = 3
management {
auto_upgrade = false
}
timeouts {
create = "30m"
update = "20m"
}
}
変更後
hcl
resource "google_container_node_pool" "node_pool" {
name = "my-node-pool"
location = "us-central1-a"
cluster = google_container_cluster.primary.name
node_count = 3
management {
auto_upgrade = true
}
timeouts {
create = "30m"
update = "20m"
}
}