설명
GKE Standard에서 config.image_type은 노드의 운영체제를 정합니다. Windows용 컨테이너는 Windows 풀에서 실행하세요. 추가 호스트 패키지가 필요 없는 Linux 서비스에는 COS_CONTAINERD가 적합합니다.
잠재적 영향
지원 기간이 지난 이미지는 보안 수정이 누락될 수 있고, 운영체제가 맞지 않으면 컨테이너가 시작되지 않습니다.
해결 방법
클러스터 버전과 호환되는 이미지를 선택하고 노드를 계속 업데이트하세요. 운영체제를 바꿀 때는 이름이 다른 새 풀에 여유 용량을 확보하고 해당 OS용 워크로드가 실행되는지 확인한 후 이전하세요.
예시
두 작업은 같은 my-pool의 Windows용·Linux용 생성 예시입니다. Windows 풀에는 시스템용 Linux 풀이 있는 VPC 네이티브 클러스터가 필요합니다. 실제 cluster 결과 객체와 프로젝트를 지정하고 /tmp/auth.pem은 서비스 계정 JSON 파일 경로로 바꾸세요.
변경 전
yaml
- name: 노드 풀 생성
google.cloud.gcp_container_node_pool:
name: my-pool
initial_node_count: 4
cluster: "{{ cluster }}"
location: us-central1-a
project: test_project
auth_kind: serviceaccount
service_account_file: /tmp/auth.pem
state: present
config:
image_type: WINDOWS_LTSC_CONTAINERD
변경 후
yaml
- name: 노드 풀 생성
google.cloud.gcp_container_node_pool:
name: my-pool
initial_node_count: 4
cluster: "{{ cluster }}"
location: us-central1-a
project: test_project
auth_kind: serviceaccount
service_account_file: /tmp/auth.pem
state: present
config:
image_type: COS_CONTAINERD