Rancher2.0에서 AKS 클러스터 생성부터 WordPress 배포까지
Azure에서 AKS 작업은 포털이 아닌 명령 기반으로 수행됩니다.
TL;DR
완전 상위 호환 슬라이드이 있으므로 여기를 읽으면 괜찮습니다.
GUI 기반으로 조작도 간단하다고 생각합니다.
배포가 끝난 후 알고 먼저 읽어두면 좋았다고 후회했습니다.
환경
Rancher Server를 미리 준비하고 클러스터를 구축할 수 있는 상태로 둡니다.
버전은 Rancher2.0 v2.2.2를 사용했습니다.

Azure 측 준비
Rancher를 사용하여 클러스터를 만드는 데 필요한 준비를 합니다.
리소스 그룹 만들기
AKS 클러스터에 대한 리소스 그룹을 만듭니다.
이름은 rancher-aks-sample
입니다.
$ az group create -l japaneast -n rancher-aks-sample
서비스 주체 작성
자원 그룹을 조작하기 위한 서비스 프린시펄을 작성합니다.
표시되는 appId
와 같은 정보는 Rancher에서 클러스터를 만들 때 필요합니다.
$ az ad sp create-for-rbac --skip-assignment -n sp-aks-sample
appId: 03f94503-xxxx-xxxx-xxxx-xxxxxxxxxxxx
displayName: sp-aks-sample
name: http://sp-aks-sample
password: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
tenant: 2bdec7af-xxxx-xxxx-xxxx-xxxxxxxxxxxx
// ロールの割り当て
$ az role assignment create --assignee 03f94503-xxxx-xxxx-xxxx-xxxxxxxxxxxx \
--role Contributor --resource-group rancher-aks-sample
리소스 공급자 등록
그렇지 않으면 클러스터를 만들 때 오류가 발생합니다.
문제해결을 참고했습니다.
$ az provider register -n Microsoft.OperationalInsights
$ az provider register -n Microsoft.OperationsManagement
AKS 클러스터 만들기
Rancher 포털에서 AKS 클러스터를 만듭니다.
Add Cluster에서 Azure AKS
를 선택합니다.

Azure에 액세스하는 데 필요한 정보를 설정합니다.

Client ID는 서비스 주체의 appId이고 Client secret는 암호 값을 설정합니다.
실행하면 클러스터가 생성됩니다.
그러나 지원되지 않는 문제가 있으며 Control Manager와 Scheduler가 정상 상태가 아닙니다.

일단 응용 프로그램 배포에 문제가없는 것 같습니다.
AKS의 이슈
Rancher의 Issue
WordPress 배포
Catalog를 사용하여 배포합니다.
(일부 화상의 대상 클러스터가 다릅니다만, AKS 클러스터로 읽어 주세요)
카탈로그에서 배포

카탈로그에서 WordPress를 선택합니다.

L7 LoadBalancer의 작성을 OFF로 해, 패스워드를 설정해 실행합니다.

LoadBalancer 배포
AKS용 L7 LoadBalancer는 Rancher에서 지원하지 않으므로 Azure에서 만들어야 합니다.

Azure CloudShell을 시작하고 Helm을 사용하도록 설정합니다.
// Tiller のサービスアカウントを作成
$ kubectl create serviceaccount --namespace kube-system tiller
$ kubectl create clusterrolebinding tiller-cluster-rule --clusterrole=cluster-admin --serviceaccount=kube-system:tiller
$ kubectl patch deploy --namespace kube-system tiller-deploy -p '{"spec":{"template":{"spec":{"serviceAccount":"tiller"}}}}'
// Helm の初期化
$ helm init
Helm을 사용하여 Ingress Controller를 만듭니다.
$ helm install stable/nginx-ingress
WordPress용 Ingress를 다음 매니페스트 파일에서 만듭니다.
wordpress-ingress.yamlapiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: wordpress-ingress
annotations:
kubernetes.io/ingress.class: nginx
nginx.ingress.kubernetes.io/ssl-redirect: "false"
nginx.ingress.kubernetes.io/rewrite-target: /
spec:
rules:
- http:
paths:
- path: /
backend:
serviceName: wordpress-wordpress
servicePort: 80
$ kubectl apply -f wordpress-ingress.yaml
이제 LoadBalancer의 공개 IP에서 WordPress에 액세스할 수 있습니다.

참고
멀티 클라우드 시대의 최강 콤비 Rancher의 Kubernetes 활용 가이드
Rancher 2.x 공식 문서
Rancher2.0 v2.0.0에서 GKE에 kubernetes 클러스터 구축에서 WordPress 배포까지
Reference
이 문제에 관하여(Rancher2.0에서 AKS 클러스터 생성부터 WordPress 배포까지), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다
https://qiita.com/kyohmizu/items/bfe1763b4cefa69718cf
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념
(Collection and Share based on the CC Protocol.)
Rancher Server를 미리 준비하고 클러스터를 구축할 수 있는 상태로 둡니다.
버전은 Rancher2.0 v2.2.2를 사용했습니다.

Azure 측 준비
Rancher를 사용하여 클러스터를 만드는 데 필요한 준비를 합니다.
리소스 그룹 만들기
AKS 클러스터에 대한 리소스 그룹을 만듭니다.
이름은 rancher-aks-sample
입니다.
$ az group create -l japaneast -n rancher-aks-sample
서비스 주체 작성
자원 그룹을 조작하기 위한 서비스 프린시펄을 작성합니다.
표시되는 appId
와 같은 정보는 Rancher에서 클러스터를 만들 때 필요합니다.
$ az ad sp create-for-rbac --skip-assignment -n sp-aks-sample
appId: 03f94503-xxxx-xxxx-xxxx-xxxxxxxxxxxx
displayName: sp-aks-sample
name: http://sp-aks-sample
password: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
tenant: 2bdec7af-xxxx-xxxx-xxxx-xxxxxxxxxxxx
// ロールの割り当て
$ az role assignment create --assignee 03f94503-xxxx-xxxx-xxxx-xxxxxxxxxxxx \
--role Contributor --resource-group rancher-aks-sample
리소스 공급자 등록
그렇지 않으면 클러스터를 만들 때 오류가 발생합니다.
문제해결을 참고했습니다.
$ az provider register -n Microsoft.OperationalInsights
$ az provider register -n Microsoft.OperationsManagement
AKS 클러스터 만들기
Rancher 포털에서 AKS 클러스터를 만듭니다.
Add Cluster에서 Azure AKS
를 선택합니다.

Azure에 액세스하는 데 필요한 정보를 설정합니다.

Client ID는 서비스 주체의 appId이고 Client secret는 암호 값을 설정합니다.
실행하면 클러스터가 생성됩니다.
그러나 지원되지 않는 문제가 있으며 Control Manager와 Scheduler가 정상 상태가 아닙니다.

일단 응용 프로그램 배포에 문제가없는 것 같습니다.
AKS의 이슈
Rancher의 Issue
WordPress 배포
Catalog를 사용하여 배포합니다.
(일부 화상의 대상 클러스터가 다릅니다만, AKS 클러스터로 읽어 주세요)
카탈로그에서 배포

카탈로그에서 WordPress를 선택합니다.

L7 LoadBalancer의 작성을 OFF로 해, 패스워드를 설정해 실행합니다.

LoadBalancer 배포
AKS용 L7 LoadBalancer는 Rancher에서 지원하지 않으므로 Azure에서 만들어야 합니다.

Azure CloudShell을 시작하고 Helm을 사용하도록 설정합니다.
// Tiller のサービスアカウントを作成
$ kubectl create serviceaccount --namespace kube-system tiller
$ kubectl create clusterrolebinding tiller-cluster-rule --clusterrole=cluster-admin --serviceaccount=kube-system:tiller
$ kubectl patch deploy --namespace kube-system tiller-deploy -p '{"spec":{"template":{"spec":{"serviceAccount":"tiller"}}}}'
// Helm の初期化
$ helm init
Helm을 사용하여 Ingress Controller를 만듭니다.
$ helm install stable/nginx-ingress
WordPress용 Ingress를 다음 매니페스트 파일에서 만듭니다.
wordpress-ingress.yamlapiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: wordpress-ingress
annotations:
kubernetes.io/ingress.class: nginx
nginx.ingress.kubernetes.io/ssl-redirect: "false"
nginx.ingress.kubernetes.io/rewrite-target: /
spec:
rules:
- http:
paths:
- path: /
backend:
serviceName: wordpress-wordpress
servicePort: 80
$ kubectl apply -f wordpress-ingress.yaml
이제 LoadBalancer의 공개 IP에서 WordPress에 액세스할 수 있습니다.

참고
멀티 클라우드 시대의 최강 콤비 Rancher의 Kubernetes 활용 가이드
Rancher 2.x 공식 문서
Rancher2.0 v2.0.0에서 GKE에 kubernetes 클러스터 구축에서 WordPress 배포까지
Reference
이 문제에 관하여(Rancher2.0에서 AKS 클러스터 생성부터 WordPress 배포까지), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다
https://qiita.com/kyohmizu/items/bfe1763b4cefa69718cf
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념
(Collection and Share based on the CC Protocol.)
$ az group create -l japaneast -n rancher-aks-sample
$ az ad sp create-for-rbac --skip-assignment -n sp-aks-sample
appId: 03f94503-xxxx-xxxx-xxxx-xxxxxxxxxxxx
displayName: sp-aks-sample
name: http://sp-aks-sample
password: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
tenant: 2bdec7af-xxxx-xxxx-xxxx-xxxxxxxxxxxx
// ロールの割り当て
$ az role assignment create --assignee 03f94503-xxxx-xxxx-xxxx-xxxxxxxxxxxx \
--role Contributor --resource-group rancher-aks-sample
$ az provider register -n Microsoft.OperationalInsights
$ az provider register -n Microsoft.OperationsManagement
Rancher 포털에서 AKS 클러스터를 만듭니다.
Add Cluster에서
Azure AKS
를 선택합니다.
Azure에 액세스하는 데 필요한 정보를 설정합니다.

Client ID는 서비스 주체의 appId이고 Client secret는 암호 값을 설정합니다.
실행하면 클러스터가 생성됩니다.
그러나 지원되지 않는 문제가 있으며 Control Manager와 Scheduler가 정상 상태가 아닙니다.

일단 응용 프로그램 배포에 문제가없는 것 같습니다.
AKS의 이슈
Rancher의 Issue
WordPress 배포
Catalog를 사용하여 배포합니다.
(일부 화상의 대상 클러스터가 다릅니다만, AKS 클러스터로 읽어 주세요)
카탈로그에서 배포

카탈로그에서 WordPress를 선택합니다.

L7 LoadBalancer의 작성을 OFF로 해, 패스워드를 설정해 실행합니다.

LoadBalancer 배포
AKS용 L7 LoadBalancer는 Rancher에서 지원하지 않으므로 Azure에서 만들어야 합니다.

Azure CloudShell을 시작하고 Helm을 사용하도록 설정합니다.
// Tiller のサービスアカウントを作成
$ kubectl create serviceaccount --namespace kube-system tiller
$ kubectl create clusterrolebinding tiller-cluster-rule --clusterrole=cluster-admin --serviceaccount=kube-system:tiller
$ kubectl patch deploy --namespace kube-system tiller-deploy -p '{"spec":{"template":{"spec":{"serviceAccount":"tiller"}}}}'
// Helm の初期化
$ helm init
Helm을 사용하여 Ingress Controller를 만듭니다.
$ helm install stable/nginx-ingress
WordPress용 Ingress를 다음 매니페스트 파일에서 만듭니다.
wordpress-ingress.yamlapiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: wordpress-ingress
annotations:
kubernetes.io/ingress.class: nginx
nginx.ingress.kubernetes.io/ssl-redirect: "false"
nginx.ingress.kubernetes.io/rewrite-target: /
spec:
rules:
- http:
paths:
- path: /
backend:
serviceName: wordpress-wordpress
servicePort: 80
$ kubectl apply -f wordpress-ingress.yaml
이제 LoadBalancer의 공개 IP에서 WordPress에 액세스할 수 있습니다.

참고
멀티 클라우드 시대의 최강 콤비 Rancher의 Kubernetes 활용 가이드
Rancher 2.x 공식 문서
Rancher2.0 v2.0.0에서 GKE에 kubernetes 클러스터 구축에서 WordPress 배포까지
Reference
이 문제에 관하여(Rancher2.0에서 AKS 클러스터 생성부터 WordPress 배포까지), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다
https://qiita.com/kyohmizu/items/bfe1763b4cefa69718cf
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념
(Collection and Share based on the CC Protocol.)
// Tiller のサービスアカウントを作成
$ kubectl create serviceaccount --namespace kube-system tiller
$ kubectl create clusterrolebinding tiller-cluster-rule --clusterrole=cluster-admin --serviceaccount=kube-system:tiller
$ kubectl patch deploy --namespace kube-system tiller-deploy -p '{"spec":{"template":{"spec":{"serviceAccount":"tiller"}}}}'
// Helm の初期化
$ helm init
$ helm install stable/nginx-ingress
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: wordpress-ingress
annotations:
kubernetes.io/ingress.class: nginx
nginx.ingress.kubernetes.io/ssl-redirect: "false"
nginx.ingress.kubernetes.io/rewrite-target: /
spec:
rules:
- http:
paths:
- path: /
backend:
serviceName: wordpress-wordpress
servicePort: 80
$ kubectl apply -f wordpress-ingress.yaml
멀티 클라우드 시대의 최강 콤비 Rancher의 Kubernetes 활용 가이드
Rancher 2.x 공식 문서
Rancher2.0 v2.0.0에서 GKE에 kubernetes 클러스터 구축에서 WordPress 배포까지
Reference
이 문제에 관하여(Rancher2.0에서 AKS 클러스터 생성부터 WordPress 배포까지), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다 https://qiita.com/kyohmizu/items/bfe1763b4cefa69718cf텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념
(Collection and Share based on the CC Protocol.)