GKE 노드 자동 업그레이드 설정 점검

GKE 노드의 자동 업그레이드와 보안 업데이트 일정을 확인하세요.

설명

새 GKE 노드 풀은 Ansible 생성 작업에서 management.auto_upgrade: yes로 자동 업그레이드를 켜세요. auto_repair는 비정상 노드를 복구하는 별도 설정입니다.

잠재적 영향

수동 업데이트가 늦으면 패치가 누락되거나 노드와 제어 플레인의 버전이 호환되지 않을 수 있습니다. 노드 자동 업그레이드를 꺼도 제어 플레인 업데이트는 계속되며 GKE가 지원 종료 버전의 노드를 업그레이드할 수 있습니다.

해결 방법

기존 풀은 gcloud container node-pools update의 --enable-autoupgrade로 설정하세요. GKE에서 업그레이드 설정과 노드 버전을 확인하고, 유지보수 시간과 허용할 중단을 정하세요. 수동 관리 시에는 지원이 끝나기 전에 업데이트를 시험하고 적용하세요.

예시

cluster에는 준비한 클러스터 리소스를 지정하고 프로젝트와 보호된 서비스 계정 JSON 파일 경로를 제공하세요.

변경 전

yaml
- name: create a node pool
  google.cloud.gcp_container_node_pool:
    name: my-pool
    initial_node_count: 4
    cluster: "{{ cluster }}"
    location: us-central1-a
    project: "{{ gcp_project }}"
    auth_kind: serviceaccount
    service_account_file: "{{ gcp_service_account_file }}"
    state: present

- name: create a third node pool
  google.cloud.gcp_container_node_pool:
    name: my-pool
    initial_node_count: 4
    cluster: "{{ cluster }}"
    location: us-central1-a
    project: "{{ gcp_project }}"
    auth_kind: serviceaccount
    service_account_file: "{{ gcp_service_account_file }}"
    state: present
    management:
      auto_repair: yes
      auto_upgrade: no

두 작업은 같은 my-pool의 설정 예시입니다. 첫 작업은 management를 생략하므로 실제 설정을 확인하세요. 두 번째는 자동 복구를 켜고 자동 업그레이드를 끕니다.

변경 후

yaml
- name: create a node pool
  google.cloud.gcp_container_node_pool:
    name: my-pool
    initial_node_count: 4
    cluster: "{{ cluster }}"
    location: us-central1-a
    project: "{{ gcp_project }}"
    auth_kind: serviceaccount
    service_account_file: "{{ gcp_service_account_file }}"
    state: present
    management:
      auto_upgrade: yes

참조