[AKS] 클러스터 로컬 계정의 무효화와 과거 자격 정보의 무효화
5044 단어 AzureKubernetesakstech

시험해 보다
클러스터 생성
일반적으로 포털 사이트에서 창설한다.기본 버전은 1.220.9입니다.
로컬 계정의 자격 정보 얻기
지금까지 보살핌을 받아 아래 명령을 통해 자격 정보를 얻었습니다.
az aks get-credentials --resource-group <resource-group> --name <cluster-name> --admin
kubectl의 집행도 문제없다.kubectl get nodes
NAME STATUS ROLES AGE VERSION
aks-agentpool-40731062-vmss000000 Ready agent 4m38s v1.20.9
aks-agentpool-40731062-vmss000001 Ready agent 4m43s v1.20.9
aks-agentpool-40731062-vmss000002 Ready agent 4m41s v1.20.9
클러스터를 통해 로컬 계정 비활성화
처음 문서에서 설명한 대로 다음 명령은 비활성화됩니다.
az aks update -g <resource-group> -n <cluster-name> --disable-local-accounts
출력에서 properties.disableLocalAccounts
필드를 true
로 설정하면 됩니다."properties": {
...
"disableLocalAccounts": true,
...
}
현지 신용장 취득(재)
관리자 자격 정보를 얻으려면 기능에 장애가 발생하고 액세스가 실패했다는 오류 메시지가 표시됩니다.OK.
az aks get-credentials --resource-group <resource-group> --name <cluster-name> --admin
(BadRequest) Getting static credential is not allowed because this cluster is set to disable local accounts.
Code: BadRequest
Message: Getting static credential is not allowed because this cluster is set to disable local accounts.
다른 한편, 이미 취득한 자격 정보로kubectl을 실행할 수 있다.이거 NG 내고 싶다.kubectl get nodes
NAME STATUS ROLES AGE VERSION
aks-agentpool-40731062-vmss000000 Ready agent 10m v1.20.9
aks-agentpool-40731062-vmss000001 Ready agent 11m v1.20.9
aks-agentpool-40731062-vmss000002 Ready agent 10m v1.20.9
이 섹션은 문서 고려 사항에 기재된 다음 섹션입니다.
이미 자격정보를 취득했다면kubectl을 수행할 수 있기 때문에 자격정보(증명서)를 취소해야 한다는 것이다.
그룹 인증서 교체
위에서 설명한 대로
az aks rotate-certs
명령만 있으면 됩니다."Azaks rotate-certs 전사 인증서를 사용하면 모든 노드가 재제작되고 AKS 클러스터는 최대 30분의 마비 시간이 발생할 수 있습니다."따라서 실제 환경에서 실행할 때는 매우 주의해야 한다.
컬렉션을 만드는 데 같은 시간이 걸리니 참을성 있게 기다려 주세요.☕
동작 확인
같은 케이스의kubectl 명령이 통과되지 않았습니다.
kubectl get nodes
Unable to connect to the server: x509: certificate signed by unknown authority (possibly because of "crypto/rsa: verification error" while trying to verify candidate authority certificate "ca")
자격 정보를 다시 얻으려고 시도했지만 로컬 계정이 비활성화되어 가져올 수 없습니다.az aks get-credentials --resource-group <resource-group> --name <cluster-name> --admin
(BadRequest) Getting static credential is not allowed because this cluster is set to disable local accounts.
Code: BadRequest
Message: Getting static credential is not allowed because this cluster is set to disable local accounts.
끝말
따라서 로컬 계정은 과거에 저장된 자격 정보의 연결을 포함하여 안전하게 비활성화됩니다.기존 클러스터에서는 본 보도와 같은 형태로 추가 작업(클러스터 증명서 전달)이 필요하다.
또 "AKS 클러스터링은 최대 30분의 감소 시간을 낼 수 있다"고 덧붙였다.이 점은 영향이 매우 크기 때문에 기존의 분류에 반영될 때 반드시 매우 주의해야 한다.
Reference
이 문제에 관하여([AKS] 클러스터 로컬 계정의 무효화와 과거 자격 정보의 무효화), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다 https://zenn.dev/08thse/articles/59-aks-cert-rotate텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념
(Collection and Share based on the CC Protocol.)