카테고리 없음
🔹 Azure AKS(Azure Kubernetes Service) 클러스터 확인 방법
idea9329
2025. 2. 21. 10:54
반응형
Azure AKS(Azure Kubernetes Service) 클러스터가 현재 존재하는지 확인하는 방법은 여러 가지가 있습니다.
✅ Azure Portal (웹 UI)
✅ Azure CLI (명령어 실행)
✅ Azure PowerShell (스크립트 활용)
✅ 1. Azure Portal에서 AKS 확인하는 방법
📌 (1) Azure Portal에서 AKS 클러스터 확인
- Azure Portal 접속 → 🔗 Azure Portal 바로가기
- 검색창에서 Kubernetes 서비스 입력 후 선택
- 현재 생성된 AKS 클러스터 목록 확인
- 클러스터를 클릭하면 상세 정보(노드, 버전, 네트워크 설정 등) 확인 가능
✅ Azure Portal을 통해 UI에서 AKS 클러스터를 쉽게 확인 가능
✅ 2. Azure CLI에서 AKS 클러스터 확인
Azure CLI를 사용하여 현재 AKS 클러스터가 있는지 확인할 수 있습니다.
📌 (1) 모든 AKS 클러스터 목록 조회
az aks list --output table
✔ 출력 예시:
Name ResourceGroup Location KubernetesVersion ProvisioningState
-------------- ----------------- ------------ ------------------- -------------------
aks-cluster-1 MyResourceGroup eastus 1.27.3 Succeeded
aks-cluster-2 DevResourceGroup westus2 1.28.0 Succeeded
📌 (2) 특정 리소스 그룹 내 AKS 클러스터 조회
az aks list --resource-group MyResourceGroup --output table
✔ 출력 예시:
Name Location KubernetesVersion ProvisioningState
-------------- --------- ------------------- -------------------
aks-cluster-1 eastus 1.27.3 Succeeded
✅ 특정 리소스 그룹 내에서만 AKS 클러스터 확인 가능
📌 (3) 특정 AKS 클러스터 존재 여부 확인
az aks show --resource-group MyResourceGroup --name aks-cluster-1
✔ 출력 예시 (클러스터 존재할 경우)
{
"id": "/subscriptions/xxxx/resourceGroups/MyResourceGroup/providers/Microsoft.ContainerService/managedClusters/aks-cluster-1",
"location": "eastus",
"kubernetesVersion": "1.27.3",
"provisioningState": "Succeeded",
"nodeResourceGroup": "MC_MyResourceGroup_aks-cluster-1_eastus"
}
❌ 클러스터가 없으면 다음과 같은 오류 발생:
ResourceNotFoundError: The Resource 'Microsoft.ContainerService/managedClusters/aks-cluster-1' under resource group 'MyResourceGroup' was not found.
✅ 3. Azure PowerShell에서 AKS 클러스터 확인
PowerShell을 사용하여 Azure AKS 클러스터를 확인할 수도 있습니다.
📌 (1) 모든 AKS 클러스터 목록 조회
Get-AzAksCluster | Format-Table Name, ResourceGroupName, Location, KubernetesVersion
✔ 출력 예시:
Name ResourceGroupName Location KubernetesVersion
------------- ------------------ ----------- -----------------
aks-cluster-1 MyResourceGroup eastus 1.27.3
aks-cluster-2 DevResourceGroup westus2 1.28.0
📌 (2) 특정 리소스 그룹 내 AKS 클러스터 조회
Get-AzAksCluster -ResourceGroupName "MyResourceGroup"
📌 (3) 특정 AKS 클러스터 존재 여부 확인
Get-AzAksCluster -ResourceGroupName "MyResourceGroup" -Name "aks-cluster-1"
✅ PowerShell을 활용하여 자동화된 스크립트에서 AKS 클러스터를 조회 가능
🚀 결론: Azure AKS 클러스터 확인 방법 정리
방법명령어 / 절차설명
Azure Portal (웹) | Kubernetes 서비스 검색 | UI에서 AKS 클러스터 확인 |
Azure CLI | az aks list --output table | 모든 AKS 클러스터 조회 |
Azure CLI | az aks show --resource-group <RG> --name <AKS> | 특정 AKS 클러스터 확인 |
PowerShell | Get-AzAksCluster | 모든 AKS 클러스터 조회 |
PowerShell | Get-AzAksCluster -ResourceGroupName "<RG>" | 특정 리소스 그룹의 AKS 조회 |
📌 이제 Azure Portal, Azure CLI, PowerShell을 사용하여 AKS 클러스터가 있는지 빠르게 확인할 수 있습니다! 🚀
반응형