|
| 1 | +# Run AranngoDB cluster on Azure Kubernetes Service (AKS) |
| 2 | + |
| 3 | +## Requirements |
| 4 | + |
| 5 | +* [kubectl](https://kubernetes.io/docs/tasks/tools/install-kubectl/) (**version >= 1.10**) |
| 6 | +* [helm](https://www.helm.sh/) |
| 7 | +* [Azure CLI](https://docs.microsoft.com/en-us/cli/azure/install-azure-cli-apt?view=azure-cli-latest) |
| 8 | + |
| 9 | +## Deploy cluster |
| 10 | +* In Azure dashboard choose **Create a resource** |
| 11 | +* Choose **Kubernetes Service** |
| 12 | + |
| 13 | +## Cluster basics (version >=1.10) |
| 14 | + |
| 15 | + |
| 16 | +## Cluster authentication (Enable RBAC) |
| 17 | + |
| 18 | + |
| 19 | +## Wait for cluster to be created |
| 20 | + |
| 21 | + |
| 22 | +## Move to control using `kubectl` |
| 23 | + |
| 24 | +* Login to Azure using CLI |
| 25 | +``` |
| 26 | + $ az login |
| 27 | + [ |
| 28 | + { |
| 29 | + "cloudName": "AzureCloud", |
| 30 | + "id": "...", |
| 31 | + "isDefault": true, |
| 32 | + "name": "ArangoDB-INC", |
| 33 | + "state": "Enabled", |
| 34 | + "tenantId": "...", |
| 35 | + "user": { |
| 36 | + "name": "xxx@arangodb.com", |
| 37 | + "type": "user" |
| 38 | + } |
| 39 | + } |
| 40 | + ] |
| 41 | +``` |
| 42 | + |
| 43 | +* Get AKS credentials to merge with local config, using resource group and cluster names used for above deployment |
| 44 | +``` |
| 45 | + $ az aks get-credentials --resource-group clifton --name ArangoDB |
| 46 | +``` |
| 47 | + |
| 48 | +* Verify successful merge |
| 49 | +``` |
| 50 | + $ kubectl get svc |
| 51 | + NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE |
| 52 | + kubernetes ClusterIP 10.0.0.1 <none> 443/TCP 38m |
| 53 | +``` |
| 54 | + |
| 55 | +* Initialise `helm` |
| 56 | +``` |
| 57 | + $ kubectl create serviceaccount --namespace kube-system tiller |
| 58 | + serviceaccount/tiller created |
| 59 | +``` |
| 60 | +``` |
| 61 | + $ kubectl create clusterrolebinding tiller-cluster-rule \ |
| 62 | + --clusterrole=cluster-admin --serviceaccount=kube-system:tiller |
| 63 | + clusterrolebinding.rbac.authorization.k8s.io/tiller-cluster-rule created |
| 64 | +``` |
| 65 | +``` |
| 66 | + $ helm init --service-account tiller |
| 67 | + $HELM_HOME has been configured at /home/kaveh/.helm. |
| 68 | + ... |
| 69 | + Happy Helming! |
| 70 | +
|
| 71 | + Tiller (the Helm server-side component) has been |
| 72 | + installed into your Kubernetes Cluster. |
| 73 | +``` |
| 74 | + |
| 75 | +* Deploy ArabgoDB operator |
| 76 | +``` |
| 77 | + $ helm install \ |
| 78 | + github.com/arangodb/kube-arangodb/releases/download/X.X.X/kube-arangodb.tgz |
| 79 | + NAME: orderly-hydra |
| 80 | + LAST DEPLOYED: Wed Oct 31 15:11:37 2018 |
| 81 | + NAMESPACE: default |
| 82 | + STATUS: DEPLOYED |
| 83 | + ... |
| 84 | + See https://docs.arangodb.com/devel/Manual/Tutorials/Kubernetes/ |
| 85 | + for how to get started. |
| 86 | +``` |
| 87 | + |
| 88 | +* Deploy ArangoDB cluster |
| 89 | +``` |
| 90 | + $ kubectl apply -f https://raw.githubusercontent.com/arangodb/kube-arangodb/master/examples/simple-cluster.yaml |
| 91 | +``` |
0 commit comments