-
[ERROR] The conditional check 'groups.get('kube_control_plane')' failed.Kubernetes 2025. 3. 20. 17:06
ubuntu22에서 ansible-core 이슈 발생!
환경
- os : ubuntu22.04
- kubespray : v2.23.0
- ansible-core : v2.14
에러 내용
ansible-core 버전이 올라가면서 groups.get('kube_control_plane')가 None일 경우 false 처리가 아닌 "Conditional is marked as unsafe" 오류 발생하도록 변경되었다.
TASK [kubernetes/preinstall : Stop if either kube_control_plane or kube_node group is empty] *** fatal: [baminet1]: FAILED! => {"msg": "The conditional check 'groups.get('kube_control_plane')' failed. The error was: Conditional is marked as unsafe, and cannot be evaluated."}
해결한 방법
groups.get(item) 자체가 None을 반환하더라도 오류가 발생하지 않도록 처리.
- roles/kubernetes/preinstall/tasks/0040-verify-settings.yml 수정
--- - name: Stop if either kube_control_plane or kube_node group is empty assert: that: "groups.get( item )"
Reference
'Kubernetes' 카테고리의 다른 글
[K8S][폐쇄망] Kubespray 폐쇄망 설치 파일 준비하기 (0) 2025.03.20 [K8S] Kubespray로 Kubernetes 설치하기 - Ubuntu (0) 2025.03.20 [K8S] Kubernetes에서 GPU 사용하기 (apt/yum) (0) 2024.03.10 [K8S] Kubespray 설정 파일 변경하기 (0) 2024.03.09 [K8S] Reserve Compute Resources (0) 2024.03.07