Azure
Azure
Istio용 Azure 클러스터를 준비하는 방법을 알려드려요.
출처: Istio 문서
본문
다음 안내를 따라 Istio용 Azure 클러스터를 준비하세요.
Istio를 완전히 지원하는 AKS 또는 셀프 매니지드 Kubernetes나 AKS용 Azure Cluster API 프로바이더(CAPZ)를 통해 Azure에 Kubernetes 클러스터를 배포할 수 있어요.
AKS
az cli, Azure 포털, Bicep을 쓰는 az cli, 또는 Terraform 등 다양한 방법으로 AKS 클러스터를 만들 수 있어요
az cli 옵션을 쓴다면 az login 인증을 완료하거나 cloud shell을 사용한 뒤 다음 명령을 실행하세요.
- AKS를 지원하는 원하는 지역 이름을 확인해요
$ az provider list --query "[?namespace=='Microsoft.ContainerService'].resourceTypes[] | [?resourceType=='managedClusters'].locations[]" -o tsv
- 원하는 지역의 지원되는 Kubernetes 버전을 확인해요
my location을 위 단계에서 얻은 원하는 지역 값으로 바꾼 뒤 실행하세요:
$ az aks get-versions --location "my location" --query "orchestrators[].orchestratorVersion"
- 리소스 그룹을 만들고 AKS 클러스터를 배포해요
myResourceGroup과 myAKSCluster는 원하는 이름으로, my location은 1단계의 값으로 바꾸세요. 해당 지역에서 1.28.3이 지원되지 않으면 적절한 버전을 쓰고 실행하세요:
$ az group create --name myResourceGroup --location "my location"
$ az aks create --resource-group myResourceGroup --name myAKSCluster --node-count 3 --kubernetes-version 1.28.3 --generate-ssh-keys
- AKS
kubeconfig자격 증명을 가져와요
myResourceGroup과 myAKSCluster를 이전 단계의 이름으로 바꾸고 실행하세요:
$ az aks get-credentials --resource-group myResourceGroup --name myAKSCluster
Azure에서 Gateway API 사용하기
AKS에서 Gateway API를 사용한다면 Gateway 리소스에 다음 설정을 추가해야 할 수도 있어요:
infrastructure:
annotations:
service.beta.kubernetes.io/port_<http[s] port>_health-probe_protocol: tcp
여기서 <http[s] port>는 HTTP(S) 리스너의 포트 번호예요.
HTTP(S) 리스너가 여러 개라면 각 리스너마다 annotation을 추가해야 해요.
이 annotation은 / 경로가 200으로 응답하지 않을 때 Azure Load Balancer 상태 확인이 동작하도록 하기 위해 필요해요.
예를 들어 Gateway API를 사용하는 Ingress Gateways 예시를 따라간다면, 대신 다음 Gateway를 배포해야 해요:
$ kubectl apply -f - <<EOF
apiVersion: gateway.networking.k8s.io/v1
kind: Gateway
metadata:
name: httpbin-gateway
spec:
infrastructure:
annotations:
service.beta.kubernetes.io/port_80_health-probe_protocol: tcp
gatewayClassName: istio
listeners:
- name: http
hostname: "httpbin.example.com"
port: 80
protocol: HTTP
allowedRoutes:
namespaces:
from: Same
EOF