이 문서에서는 VMware용 Anthos 클러스터(GKE On-Prem) 버전 1.7에서 알려진 문제를 설명합니다.
'GCP에 등록 실패'로 인해 사용자 클러스터 업그레이드 실패
카테고리
업그레이드
식별된 버전
1.7.0+, 1.8.0+
증상
사용자 클러스터를 1.7 버전으로 업그레이드하는 경우 gkectl upgrade cluster
명령어가 다음과 비슷한 오류 메시지와 함께 실패합니다.
$ gkectl upgrade cluster --kubeconfig kubeconfig --config user-cluster.yaml
…
Upgrading to bundle version: "1.7.1-gke.4"
…
Exit with error:
failed to register to GCP, gcloud output: , error: error running command 'gcloud alpha container hub memberships register foo-cluster --kubeconfig kubeconfig --context cluster --version 20210129-01-00 --enable-workload-identity --has-private-issuer --verbosity=error --quiet': error: exit status 1, stderr: 'Waiting for membership to be created...
이 오류는 Connect 에이전트가 업그레이드되지 않은 것을 제외하고는 사용자 클러스터 업그레이드가 거의 완료되었음을 의미합니다. 하지만 GKE Connect의 기능은 영향을 받지 않습니다.
원인
1.7 버전에 사용된 Connect 에이전트 버전 20210129-01-00
은 지원되지 않습니다.
해결 방법
문제를 완화하려면 Google 지원팀에 문의하세요.
Ubuntu 노드에서 재부팅 후 systemd-timesyncd가 실행되지 않음
카테고리
OS
식별된 버전
1.7.1-1.7.5, 1.8.0-1.8.4, 1.9.0+
증상
systemctl status systemd-timesyncd
에서 서비스 종료를 보여줍니다.
● systemd-timesyncd.service - Network Time Synchronization
Loaded: loaded (/lib/systemd/system/systemd-timesyncd.service; enabled; vendor preset: enabled)
Active: inactive (dead)
이로 인해 시간 미동기화 문제가 발생할 수 있습니다.
원인
chrony
가 Ubuntu OS 이미지에 잘못 설치되었으며, chrony
와 systemd-timesyncd
간에 충돌이 발생하여 systemd-timesyncd
는 비활성 상태가 되고 chrony
는 Ubuntu VM이 재부팅할 때마다 매번 활성화됩니다. 그러나 systemd-timesyncd
는 VM의 기본 ntp 클라이언트여야 합니다.
해결 방법
옵션 1: VM이 재부팅될 때마다 restart systemd-timesyncd
를 수동으로 실행합니다.
옵션 2: systemd-timesyncd
가 종료되면 항상 다시 시작되도록 다음 Daemonset을 배포합니다.
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: ensure-systemd-timesyncd
spec:
selector:
matchLabels:
name: ensure-systemd-timesyncd
template:
metadata:
labels:
name: ensure-systemd-timesyncd
spec:
hostIPC: true
hostPID: true
containers:
- name: ensure-systemd-timesyncd
# Use your preferred image.
image: ubuntu
command:
- /bin/bash
- -c
- |
while true; do
echo $(date -u)
echo "Checking systemd-timesyncd status..."
chroot /host systemctl status systemd-timesyncd
if (( $? != 0 )) ; then
echo "Restarting systemd-timesyncd..."
chroot /host systemctl start systemd-timesyncd
else
echo "systemd-timesyncd is running."
fi;
sleep 60
done
volumeMounts:
- name: host
mountPath: /host
resources:
requests:
memory: "10Mi"
cpu: "10m"
securityContext:
privileged: true
volumes:
- name: host
hostPath:
path: /
````
## ClientConfig custom resource
`gkectl update` reverts any manual changes that you have made to the ClientConfig
custom resource. We strongly recommend that you back up the ClientConfig
resource after every manual change.
## `kubectl describe CSINode` and `gkectl diagnose snapshot`
`kubectl describe CSINode` and `gkectl diagnose snapshot` sometimes fail due to
the
[OSS Kubernetes issue](https://github.com/kubernetes/kubectl/issues/848){:.external}
on dereferencing nil pointer fields.
## OIDC and the CA certificate
The OIDC provider doesn't use the common CA by default. You must explicitly
supply the CA certificate.
Upgrading the admin cluster from 1.5 to 1.6.0 breaks 1.5 user clusters that use
an OIDC provider and have no value for `authentication.oidc.capath` in the
[user cluster configuration file](/anthos/clusters/docs/on-prem/1.7/how-to/user-cluster-configuration-file).
To work around this issue, run the following script:
<section><pre class="devsite-click-to-copy">
USER_CLUSTER_KUBECONFIG=<var class="edit">YOUR_USER_CLUSTER_KUBECONFIG</var>
IDENTITY_PROVIDER=<var class="edit">YOUR_OIDC_PROVIDER_ADDRESS</var>
openssl s_client -showcerts -verify 5 -connect $IDENTITY_PROVIDER:443 < /dev/null | awk '/BEGIN CERTIFICATE/,/END CERTIFICATE/{ if(/BEGIN CERTIFICATE/){i++}; out="tmpcert"i".pem"; print >out}'
ROOT_CA_ISSUED_CERT=$(ls tmpcert*.pem | tail -1)
ROOT_CA_CERT="/etc/ssl/certs/$(openssl x509 -in $ROOT_CA_ISSUED_CERT -noout -issuer_hash).0"
cat tmpcert*.pem $ROOT_CA_CERT > certchain.pem CERT=$(echo $(base64 certchain.pem) | sed 's\ \\g') rm tmpcert1.pem tmpcert2.pem
kubectl --kubeconfig $USER_CLUSTER_KUBECONFIG patch clientconfig default -n kube-public --type json -p "[{ \"op\": \"replace\", \"path\": \"/spec/authentication/0/oidc/certificateAuthorityData\", \"value\":\"${CERT}\"}]"
</pre></section>
Replace the following:
* <var>YOUR_OIDC_IDENTITY_PROVICER</var>: The address of your OIDC provider:
* <var>YOUR_YOUR_USER_CLUSTER_KUBECONFIG</var>: The path of your user cluster
kubeconfig file.
## gkectl check-config</code> validation fails: can't find F5 BIG-IP partitions
<dl>
<dt>Symptoms</dt>
<dd><p>Validation fails because F5 BIG-IP partitions can't be found, even though they exist.</p></dd>
<dt>Potential causes</dt>
<dd><p>An issue with the F5 BIG-IP API can cause validation to fail.</p></dd>
<dt>Resolution</dt>
<dd><p>Try running <code>gkectl check-config</code> again.</p></dd>
</dl>
## Disruption for workloads with PodDisruptionBudgets {:#workloads_pdbs_disruption}
Upgrading clusters can cause disruption or downtime for workloads that use
[PodDisruptionBudgets](https://kubernetes.io/docs/concepts/workloads/pods/disruptions/){:.external}
(PDBs).
## Nodes fail to complete their upgrade process
If you have `PodDisruptionBudget` objects configured that are unable to
allow any additional disruptions, node upgrades might fail to upgrade to the
control plane version after repeated attempts. To prevent this failure, we
recommend that you scale up the `Deployment` or `HorizontalPodAutoscaler` to
allow the node to drain while still respecting the `PodDisruptionBudget`
configuration.
To see all `PodDisruptionBudget` objects that do not allow any disruptions:
kubectl get poddisruptionbudget --all-namespaces -o jsonpath='{range .items[?(@.status.disruptionsAllowed==0)]}{.metadata.name}/{.metadata.namespace}{"\n"}{end}' ```
로그 전달자가 OAuth 2.0 요청을 과도하게 수행함
VMware용 Anthos 클러스터 버전 1.7.1에서는 로그 전달자가 OAuth 2.0 요청을 과도하게 수행하여 메모리를 소비하는 경우가 발생할 수 있습니다. 다음은 stackdriver-operator
버전을 다운그레이드하고, 디스크를 삭제하고, 로그 전달자를 다시 시작하는 해결 방법입니다.
0단계: 필요에 따라 비공개 레지스트리에 이미지 다운로드
비공개 레지스트리를 사용하는 경우 계속하기 전 다음 단계에 따라 비공개 레지스트리에 이미지를 다운로드합니다. 비공개 레지스트리를 사용하지 않는 경우 이 단계를 생략합니다.
PRIVATE_REGISTRY_HOST를 비공개 Docker 레지스트리의 호스트 이름 또는 IP 주소로 바꿉니다.
stackdriver-operator
docker pull gcr.io/gke-on-prem-release/stackdriver-operator:v0.0.440 docker tag gcr.io/gke-on-prem-release/stackdriver-operator:v0.0.440 \ PRIVATE_REGISTRY_HOST/stackdriver-operator:v0.0.440 docker push PRIVATE_REGISTRY_HOST/stackdriver-operator:v0.0.440
fluent-bit
docker pull gcr.io/gke-on-prem-release/fluent-bit:v1.6.10-gke.3 docker tag gcr.io/gke-on-prem-release/fluent-bit:v1.6.10-gke.3 \ PRIVATE_REGISTRY_HOST/fluent-bit:v1.6.10-gke.3 docker push PRIVATE_REGISTRY_HOST/fluent-bit:v1.6.10-gke.3
prometheus
docker pull gcr.io/gke-on-prem-release/prometheus:2.18.1-gke.0 docker tag gcr.io/gke-on-prem-release/prometheus:2.18.1-gke.0 \ PRIVATE_REGISTRY_HOST/prometheus:2.18.1-gke.0 docker push PRIVATE_REGISTRY_HOST/prometheus:2.18.1-gke.0
1단계: stackdriver-operator 버전 다운그레이드
- 다음 명령어를 실행하여 stackdriver-operator 버전을 다운그레이드합니다.
kubectl --kubeconfig [CLUSTER_KUBECONFIG] -n kube-system patch deployment stackdriver-operator -p \ '{"spec":{"template":{"spec":{"containers":[{"name":"stackdriver-operator","image":"gcr.io/gke-on-prem-release/stackdriver-operator:v0.0.440"}]}}}}'
2단계: 로그 전달자에 대해 디스크 버퍼 삭제
- 클러스터에서 DaemonSet를 배포하여 버퍼를 삭제합니다.
apiVersion: apps/v1 kind: DaemonSet metadata: name: fluent-bit-cleanup namespace: kube-system spec: selector: matchLabels: app: fluent-bit-cleanup template: metadata: labels: app: fluent-bit-cleanup spec: containers: - name: fluent-bit-cleanup image: debian:10-slim command: ["bash", "-c"] args: - | rm -rf /var/log/fluent-bit-buffers/ echo "Fluent Bit local buffer is cleaned up." sleep 3600 volumeMounts: - name: varlog mountPath: /var/log securityContext: privileged: true tolerations: - key: "CriticalAddonsOnly" operator: "Exists" - key: node-role.kubernetes.io/master effect: NoSchedule - key: node-role.gke.io/observability effect: NoSchedule volumes: - name: varlog hostPath: path: /var/log
- 디스크 버퍼가 삭제되었는지 확인합니다.
kubectl --kubeconfig [CLUSTER_KUBECONFIG] logs -n kube-system -l app=fluent-bit-cleanup | grep "cleaned up" | wc -l
출력에 클러스터에 있는 노드 수가 표시됩니다.
kubectl --kubeconfig [CLUSTER_KUBECONFIG] -n kube-system get pods -l app=fluent-bit-cleanup --no-headers | wc -l
출력에 클러스터에 있는 노드 수가 표시됩니다.
- cleanup DaemonSet를 삭제합니다.
kubectl --kubeconfig [CLUSTER_KUBECONFIG] -n kube-system delete ds fluent-bit-cleanup
3단계: 로그 전달자 다시 시작
kubectl --kubeconfig [CLUSTER_KUBECONFIG] -n kube-system rollout restart ds/stackdriver-log-forwarder
로그 및 측정항목이 stackdriver.projectID
로 지정된 프로젝트로 전송되지 않음
VMware용 Anthos 클러스터 1.7에서는 클러스터 구성 파일의 stackdriver.serviceAccountKeyPath
필드에 지정된 서비스 계정의 상위 프로젝트로 로그가 전송됩니다. stackdriver.projectID
값은 무시됩니다. 이 문제는 이후 출시 버전에서 해결될 예정입니다.
문제 해결을 위해서는 로깅-모니터링 서비스 계정의 상위 프로젝트에서 로그를 확인합니다.
관리자 클러스터를 업그레이드하기 전에 인증서 갱신이 필요할 수 있음
관리자 클러스터 업그레이드 절차를 시작하기 전에 관리자 클러스터 인증서가 현재 유효한지 확인하고 유효하지 않은 경우 갱신해야 합니다.
관리자 클러스터 인증서 갱신 프로세스
시작하기 전에 관리 워크스테이션에 OpenSSL이 설치되어 있어야 합니다.
관리자 마스터 노드의 IP 주소와 SSH 키를 가져옵니다.
kubectl --kubeconfig [ADMIN_CLUSTER_KUBECONFIG] get secrets -n kube-system sshkeys \ -o jsonpath='{.data.vsphere_tmp}' | base64 -d > \ ~/.ssh/admin-cluster.key && chmod 600 ~/.ssh/admin-cluster.key export MASTER_NODE_IP=$(kubectl --kubeconfig [ADMIN_CLUSTER_KUBECONFIG] get nodes -o \ jsonpath='{.items[*].status.addresses[?(@.type=="ExternalIP")].address}' \ --selector='node-role.kubernetes.io/master')
인증서가 만료되었는지 확인합니다.
ssh -i ~/.ssh/admin-cluster.key ubuntu@"${MASTER_NODE_IP}" \ "sudo kubeadm alpha certs check-expiration"
인증서가 만료된 경우 관리자 클러스터를 업그레이드하기 전에 갱신해야 합니다.
관리자 클러스터 kubeconfig 파일도 관리자 인증서가 만료되면 만료되므로 만료 전에 이 파일을 백업해야 합니다.
관리자 클러스터 kubeconfig 파일을 백업합니다.
ssh -i ~/.ssh/admin-cluster.key ubuntu@"${MASTER_NODE_IP}"
"sudo cat /etc/kubernetes/admin.conf" > new_admin.conf vi [ADMIN_CLUSTER_KUBECONFIG]kubeconfig의
client-certificate-data
및client-key-data
를 생성된new_admin.conf
파일의client-certificate-data
및client-key-data
로 바꿉니다.
이전 인증서를 백업합니다.
이 단계는 선택사항이지만 권장됩니다.
# ssh into admin master if you didn't in the previous step ssh -i ~/.ssh/admin-cluster.key ubuntu@"${MASTER_NODE_IP}" # on admin master sudo tar -czvf backup.tar.gz /etc/kubernetes logout # on worker node sudo scp -i ~/.ssh/admin-cluster.key \ ubuntu@"${MASTER_NODE_IP}":/home/ubuntu/backup.tar.gz .
kubeadm으로 인증서를 갱신합니다.
# ssh into admin master ssh -i ~/.ssh/admin-cluster.key ubuntu@"${MASTER_NODE_IP}" # on admin master sudo kubeadm alpha certs renew all
관리자 마스터 노드에서 실행 중인 정적 포드를 다시 시작합니다.
# on admin master cd /etc/kubernetes sudo mkdir tempdir sudo mv manifests/*.yaml tempdir/ sleep 5 echo "remove pods" # ensure kubelet detect those change remove those pods # wait until the result of this command is empty sudo docker ps | grep kube-apiserver # ensure kubelet start those pods again echo "start pods again" sudo mv tempdir/*.yaml manifests/ sleep 30 # ensure kubelet start those pods again # should show some results sudo docker ps | grep -e kube-apiserver -e kube-controller-manager -e kube-scheduler -e etcd # clean up sudo rm -rf tempdir logout
관리자 클러스터 워커 노드의 인증서 갱신
노드 인증서 만료일 확인
kubectl get nodes -o wide # find the oldest node, fill NODE_IP with the internal ip of that node ssh -i ~/.ssh/admin-cluster.key ubuntu@"${NODE_IP}" openssl x509 -enddate -noout -in /var/lib/kubelet/pki/kubelet-client-current.pem logout
인증서가 곧 만료되는 경우 수동 노드 복구로 노드 인증서를 갱신하세요.
갱신된 인증서의 유효성을 검사하고 kube-apiserver의 인증서를 검증해야 합니다.
인증서 만료를 확인합니다.
ssh -i ~/.ssh/admin-cluster.key ubuntu@"${MASTER_NODE_IP}"
"sudo kubeadm alpha certs check-expiration"kube-apiserver의 인증서를 확인합니다.
# Get the IP address of kube-apiserver cat [ADMIN_CLUSTER_KUBECONFIG] | grep server # Get the current kube-apiserver certificate openssl s_client -showcerts -connect
:
| sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p'
> current-kube-apiserver.crt # check expiration date of this cert openssl x509 -in current-kube-apiserver.crt -noout -enddate
/etc/cron.daily/aide 스크립트가 /run의 모든 공간을 소비하여 포드에 비정상 종료 루프가 발생함
VMware용 Anthos 클러스터 1.7.2부터 시작하여 Ubuntu OS 이미지가 CIS L1 서버 벤치마크로 강화됩니다.
.
그 결과 CIS L1 서버 규칙 "1.4.2 파일 시스템 무결성에 대한 정기 검사 확인"을 따르기 위해 aide 검사가 예약되도록 크론 스크립트 /etc/cron.daily/aide
가 설치되었습니다.
이 스크립트는 /run/aide
를 임시 디렉터리로 사용하여 크론 로그를 저장하고 시간 경과에 따라 /run
의 모든 공간을 소비할 수 있습니다. 해결 방법은 /etc/cron.daily/aide 스크립트가 /run의 모든 공간 소비를 참조하세요.
노드에서 하나 이상의 포드 비정상 종료 루프가 발견될 경우 노드에서 df -h /run
을 실행합니다. 명령어 결과에 100% 공간 사용이 표시되면 이 문제가 발생할 가능성이 높습니다.
이 문제는 이후 출시 버전에서 해결될 예정입니다. 한편 다음 두 가지 해결 방법 중 하나로 이 문제를 해결할 수 있습니다.
/run/aide/cron.daily.old*
에서 주기적으로 로그 파일을 삭제합니다(권장).- 위의 외부 링크에 언급된 단계를 따릅니다. 참고: 이 해결방법은 노드 규정 준수 상태에 영향을 줄 수 있습니다.
VMware용 Anthos 클러스터 사용(Anthos Service Mesh 버전 1.7 이상)
VMware용 Anthos 클러스터(Anthos Service Mesh 버전 1.7 이상)를 사용하고 VMware용 Anthos 클러스터 버전 1.6.0~1.6.3 또는 VMware용 Anthos 클러스터 버전 1.7.0~1.7.2로 업그레이드하려면 다음 커스텀 리소스 정의(CRD)에서 bundle.gke.io/component-name
및 bundle.gke.io/component-version
라벨을 삭제해야 합니다.
destinationrules.networking.istio.io
envoyfilters.networking.istio.io
serviceentries.networking.istio.io
virtualservices.networking.istio.io
다음 명령어를 실행하여 사용자 클러스터에서 CRD
destinationrules.networking.istio.io
를 업데이트합니다.kubectl edit crd destinationrules.networking.istio.io --kubeconfig USER_CLUSTER_KUBECONFIG
CRD에서
bundle.gke.io/component-version
및bundle.gke.io/component-name
라벨을 삭제합니다.
또는 1.6.4 및 1.7.3 출시 버전을 기다린 후 1.6.4 또는 1.7.3으로 바로 업그레이드해도 됩니다.
비밀번호 만료 문제로 인해 관리 워크스테이션에 로그인할 수 없음
다음 버전의 VMware용 Anthos 클러스터를 사용하는 경우 이 문제가 발생할 수 있습니다.
- 1.7.2-gke.2
- 1.7.3-gke.2
- 1.8.0-gke.21
- 1.8.0-gke.24
- 1.8.0-gke.25
- 1.8.1-gke.7
- 1.8.2-gke.8
관리 워크스테이션, 클러스터 노드, Seesaw 노드를 포함하여 Anthos VM에 SSH 연결을 시도할 때 다음 오류가 발생할 수 있습니다.
WARNING: Your password has expired.
이 오류는 VM의 ubuntu 사용자 비밀번호가 만료되었기 때문에 발생합니다. VM에 로그인하기 전에 수동으로 사용자 비밀번호의 만료 시간을 큰 값으로 재설정해야 합니다.
비밀번호 만료 오류 방지
위에 나열된 영향을 받는 버전을 실행 중이며 사용자 비밀번호가 아직 만료되지 않은 경우 SSH 오류를 확인하기 전에 만료 시간을 연장해야 합니다.
각 Anthos VM에서 다음 명령어를 실행합니다.
sudo chage -M 99999 ubuntu
비밀번호 만료 오류 완화
사용자 비밀번호가 이미 만료되어 VM에 로그인하여 만료 시간을 연장할 수 없는 경우 각 구성요소에 대해 다음 완화 단계를 수행하세요.
관리 워크스테이션
임시 VM을 사용하여 다음 단계를 수행합니다. 임시 VM으로 사용할 1.7.1-gke.4 버전을 사용하여 관리 워크스테이션을 만들 수 있습니다.
임시 VM과 관리 워크스테이션의 전원이 꺼져 있는지 확인합니다.
관리 워크스테이션의 부팅 디스크를 임시 VM에 연결합니다. 부팅 디스크는 '하드 디스크 1' 라벨이 있는 디스크입니다.
다음 명령어를 실행하여 VM 내에 부팅 디스크를 마운트합니다.
dev/sdc1
을 자체 부팅 디스크 식별자로 바꿉니다.sudo mkdir -p /mnt/boot-disk sudo mount /dev/sdc1 /mnt/boot-disk
ubuntu 사용자 만료일을
99999
일과 같이 큰 값으로 설정합니다.sudo chroot /mnt/boot-disk chage -M 99999 ubuntu
임시 VM을 종료합니다.
관리자 워크스테이션의 전원을 켭니다. 이제 평소와 같이 SSH를 사용할 수 있습니다.
정리를 위해 임시 VM을 삭제합니다.
관리자 클러스터 제어 영역 VM
안내에 따라 관리자 클러스터 제어 영역 VM을 다시 만듭니다.
관리자 클러스터 부가기능 VM
관리자 워크스테이션에서 다음 명령어를 실행하여 VM을 다시 만듭니다.
kubectl --kubeconfig=ADMIN_CLUSTER_KUBECONFIG patch machinedeployment gke-admin-node --type=json -p="[{'op': 'add', 'path': '/spec/template/spec/metadata/annotations', 'value': {"kubectl.kubernetes.io/restartedAt": "version1"}}]"
이 명령어를 실행한 후 관리자 클러스터 부가기능 VM이 재생성을 완료하고 준비될 때까지 기다린 후 다음 단계를 계속 진행합니다.
사용자 클러스터 제어 영역 VM
관리자 워크스테이션에서 다음 명령어를 실행하여 VM을 다시 만듭니다.
usermaster=`kubectl --kubeconfig=ADMIN_CLUSTER_KUBECONFIG get machinedeployments -l set=user-master -o name` && kubectl --kubeconfig=ADMIN_CLUSTER_KUBECONFIG patch $usermaster --type=json -p="[{'op': 'add', 'path': '/spec/template/spec/metadata/annotations', 'value': {"kubectl.kubernetes.io/restartedAt": "version1"}}]"
이 명령어를 실행한 후 사용자 클러스터 제어 영역 VM이 재생성을 완료하고 준비될 때까지 기다린 후 다음 단계를 계속 진행합니다.
사용자 클러스터 작업자 VM
관리자 워크스테이션에서 다음 명령어를 실행하여 VM을 다시 만듭니다.
for md in `kubectl --kubeconfig=USER_CLUSTER_KUBECONFIG get machinedeployments -l set=node -o name`; do kubectl patch --kubeconfig=USER_CLUSTER_KUBECONFIG $md --type=json -p="[{'op': 'add', 'path': '/spec/template/spec/metadata/annotations', 'value': {"kubectl.kubernetes.io/restartedAt": "version1"}}]"; done
Seesaw VM
관리자 워크스테이션에서 다음 명령어를 실행하여 Seesaw VM을 다시 만듭니다. 이때 다운타임이 발생합니다. 부하 분산기에 HA가 사용 설정된 경우 최대 다운타임은 2초입니다.
gkectl upgrade loadbalancer --kubeconfig ADMIN_CLUSTER_KUBECONFIG --config ADMIN_CLUSTER_CONFIG --admin-cluster --no-diff gkectl upgrade loadbalancer --kubeconfig ADMIN_CLUSTER_KUBECONFIG --config USER_CLUSTER_CONFIG --no-diff
7.0U2 미만 버전으로 vCenter 다시 시작 또는 업그레이드
7.0U2 미만의 버전에서 vCenter가 업그레이드되거나 그 밖의 경우 다시 시작되면 vCenter의 VM 정보에 있는 네트워크 이름이 올바르지 않으며 머신이 Unavailable
상태가 됩니다. 그러면 결국 노드가 자동 복구되어 새로운 노드가 생성됩니다.
관련 govmomi 버그: https://github.com/vmware/govmomi/issues/2552
이 해결 방법은 VMware 지원팀에서 제공합니다.
1. The issue is fixed in vCenter versions 7.0U2 and above. 2. For lower versions: Right-click the host, and then select Connection > Disconnect. Next, reconnect, which forces an update of the VM's portgroup.
원격 호스트에서 SSH 연결 종료
VMware용 Anthos 클러스터 버전 1.7.2 이상의 경우 Ubuntu OS 이미지가 CIS L1 서버 벤치마크로 강화됩니다.
CIS 규칙 '5.2.16 SSH 유휴 제한 시간 간격이 구성되었는지 확인'을 충족하도록 /etc/ssh/sshd_config
가 다음과 같이 설정됩니다.
ClientAliveInterval 300 ClientAliveCountMax 0
이 설정의 목적은 유휴 시간 5분이 지난 후 클라이언트 세션을 종료하는 것입니다. 하지만 ClientAliveCountMax 0
값은 예기치 않은 동작을 가져옵니다. 관리자 워크스테이션 또는 클러스터 노드에서 SSH 세션을 사용하면 SSH 클라이언트가 유휴 상태가 아니더라도 SSH 연결이 끊길 수 있습니다. 예를 들어 시간이 오래 걸리는 명령어를 실행하면 다음 메시지와 함께 명령어가 종료될 수 있습니다.
Connection to [IP] closed by remote host. Connection to [IP] closed.
이 문제를 해결하려면 다음 중 하나를 수행하세요.
SSH 연결이 끊길 때 명령어가 종료되지 않도록
nohup
를 사용합니다.nohup gkectl upgrade admin --config admin-cluster.yaml --kubeconfig kubeconfig
0이 아닌
ClientAliveCountMax
값을 사용하도록sshd_config
를 업데이트합니다. CIS 규칙은 3보다 작은 값을 사용하는 것이 좋습니다.sudo sed -i 's/ClientAliveCountMax 0/ClientAliveCountMax 1/g' /etc/ssh/sshd_config sudo systemctl restart sshd
SSH 세션을 다시 연결해야 합니다.
docker, containerd, runc 취약점 스캔의 거짓양성
VMware용 Anthos 클러스터와 함께 제공되는 Ubuntu OS 이미지의 docker, containerd, runc는 Ubuntu PPA를 사용하는 특수 버전으로 고정됩니다. 이렇게 하면 VMware용 Anthos 클러스터가 모든 컨테이너 런타임 변경사항을 출시 전에 검증합니다.
하지만 다양한 CVE 스캔 도구에서 취약점 피드로 사용하는 Ubuntu CVE Tracker에 대한 특수 버전은 알려지지 않았습니다. 따라서 docker, containerd, runc 취약점 스캔 결과에 거짓양성이 표시됩니다.
예를 들어 CVE 스캔 결과에 다음과 같은 거짓양성이 표시될 수 있습니다. VMware용 Anthos 클러스터의 최신 패치 버전에서는 이러한 CVE가 이미 수정되었습니다.
CVE 수정 사항은 출시 노트를 참조하세요.
Canonical에서는 이 문제를 인식하고 있으며 수정 사항은 https://github.com/canonical/sec-cvescan/issues/73에서 추적됩니다.
/etc/cron.daily/aide
CPU 및 메모리 급증 문제
VMware용 Anthos 클러스터 1.7.2부터 Ubuntu OS 이미지가 CIS L1 서버 벤치마크로 강화되었습니다.
따라서 CIS L1 서버 규칙인 '1.4.2 파일 시스템 무결성을 정기적으로 검증'을 준수하기 위해 aide
검사를 예약하는 /etc/cron.daily/aide
크론 스크립트가 설치되었습니다.
크론 작업은 매일 오전 6시 25분(UTC)에 실행됩니다. 파일 시스템의 파일 수에 따라 이 aide
프로세스로 인해 해당 시간에 CPU 및 메모리 사용량이 급증할 수 있습니다.
급증이 워크로드에 영향을 주는 경우 일일 크론 작업을 사용 중지할 수 있습니다.
`sudo chmod -x /etc/cron.daily/aide`.