Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation/add aks tutorial #286

Merged
merged 4 commits into from
Nov 2, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
91 changes: 91 additions & 0 deletions docs/Manual/Tutorials/Kubernetes/AKS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
# Run AranngoDB cluster on Azure Kubernetes Service (AKS)

## Requirements

* [kubectl](https://kubernetes.io/docs/tasks/tools/install-kubectl/) (**version >= 1.10**)
* [helm](https://www.helm.sh/)
* [Azure CLI](https://docs.microsoft.com/en-us/cli/azure/install-azure-cli-apt?view=azure-cli-latest)

## Deploy cluster
* In Azure dashboard choose **Create a resource**
* Choose **Kubernetes Service**

## Cluster basics (version >=1.10)
![basics](./aks-create-basics.png)

## Cluster authentication (Enable RBAC)
![basics](./aks-create-auth.png)

## Wait for cluster to be created
![basics](./aks-create-valid.png)

## Move to control using `kubectl`

* Login to Azure using CLI
```
$ az login
[
{
"cloudName": "AzureCloud",
"id": "...",
"isDefault": true,
"name": "ArangoDB-INC",
"state": "Enabled",
"tenantId": "...",
"user": {
"name": "[email protected]",
"type": "user"
}
}
]
```

* Get AKS credentials to merge with local config, using resource group and cluster names used for above deployment
```
$ az aks get-credentials --resource-group clifton --name ArangoDB
```

* Verify successful merge
```
$ kubectl get svc
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
kubernetes ClusterIP 10.0.0.1 <none> 443/TCP 38m
```

* Initialise `helm`
```
$ kubectl create serviceaccount --namespace kube-system tiller
serviceaccount/tiller created
```
```
$ kubectl create clusterrolebinding tiller-cluster-rule \
--clusterrole=cluster-admin --serviceaccount=kube-system:tiller
clusterrolebinding.rbac.authorization.k8s.io/tiller-cluster-rule created
```
```
$ helm init --service-account tiller
$HELM_HOME has been configured at /home/kaveh/.helm.
...
Happy Helming!

Tiller (the Helm server-side component) has been
installed into your Kubernetes Cluster.
```

* Deploy ArabgoDB operator
```
$ helm install \
github.com/arangodb/kube-arangodb/releases/download/X.X.X/kube-arangodb.tgz
NAME: orderly-hydra
LAST DEPLOYED: Wed Oct 31 15:11:37 2018
NAMESPACE: default
STATUS: DEPLOYED
...
See https://docs.arangodb.com/devel/Manual/Tutorials/Kubernetes/
for how to get started.
```

* Deploy ArangoDB cluster
```
$ kubectl apply -f https://raw.githubusercontent.com/arangodb/kube-arangodb/master/examples/simple-cluster.yaml
```
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.