Skip to content

Commit fd3882d

Browse files
committed
Adding GKE tutorial
1 parent 448f340 commit fd3882d

File tree

8 files changed

+119
-0
lines changed

8 files changed

+119
-0
lines changed
Lines changed: 119 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
1+
# Start ArangoDB on Google Kubernetes Engine in 5 minutes
2+
3+
In this guide you'll learn how to run ArangoDB on Google Kubernetes Engine (GKE).
4+
5+
## Create a Kubernetes cluster
6+
7+
In order to run ArangoDB on GKE you first need to create a Kubernetes cluster.
8+
9+
To do so, go to the GKE console.
10+
You'll find a list of existing clusters (initially empty).
11+
12+
![clusters](./gke-clusters.png)
13+
14+
Click on `CREATE CLUSTER`.
15+
16+
In the form that follows, enter information as seen in the screenshot below.
17+
18+
![create a cluser](./gke-create-cluster.png)
19+
20+
We've succesfully ran clusters with 4 `1 vCPU` nodes or 3 `2 vCPU` nodes.
21+
Smaller node configurations will likely lead to unschedulable `Pods`.
22+
23+
Once you click `Create`, you'll return to the list of clusters and your
24+
new cluster will be listed there.
25+
26+
![with new cluster](./gke-clusters-added.png)
27+
28+
It will take a few minutes for the cluster to be created.
29+
30+
Once you're cluster is ready, a `Connect` button will appear in the list.
31+
32+
![cluster is ready](./gke-clusters-ready.png)
33+
34+
## Getting access to your Kubernetes cluster
35+
36+
Once your cluster is ready you must get access to it.
37+
The standard `Connect` button provided by GKE will give you access with only limited
38+
permissions. Since the Kubernetes operator also requires some cluster wide
39+
permissions, you need "administrator" permissions.
40+
41+
To get these permissions, do the following.
42+
43+
Prepare your `~/.kube/config` with the following content:
44+
45+
```yaml
46+
apiVersion: v1
47+
clusters:
48+
- cluster:
49+
certificate-authority-data:
50+
server: https://
51+
name: my_cluster
52+
contexts:
53+
- context:
54+
cluster: my_cluster
55+
user: my_cluster
56+
name: my_cluster
57+
current-context: my_cluster
58+
kind: Config
59+
preferences: {}
60+
users:
61+
- name: my_cluster
62+
user:
63+
username: admin
64+
password:
65+
```
66+
67+
Click on the `Edit` button (pencil image) next to your cluster.
68+
This will lead you to the following page.
69+
70+
![edit cluster](./gke-edit-cluster.png)
71+
72+
Copy the `Endpoint` IP address and paste it after `server: https://`.
73+
74+
The click on `Show credentials`.
75+
The following popup will appear.
76+
77+
![show credentials](./gke-show-credentials.png)
78+
79+
Copy the `Password` and paste it after `password:`.
80+
81+
Close the popup and then return to the cluster list.
82+
83+
Click on `Connect` next to your cluster.
84+
The following popup will appear.
85+
86+
![connect to cluster](./gke-connect-to-cluster.png)
87+
88+
Click on `Run in Cloud Shell`.
89+
It will take some time to launch a shell (in your browser).
90+
91+
Once ready, run the `gcloud` command that is already prepare in your commandline.
92+
93+
The run `cat ~/.kube/config` and copy the line that starts with `certificate-authority-data:`.
94+
Override the corresponding line in your local `~/.kube.config` file.
95+
96+
You should now be able to access your cluster using `kubectl`.
97+
98+
To verify try a command like:
99+
100+
```bash
101+
kubectl get pods --all-namespaces
102+
```
103+
104+
## Installing `kube-arangodb`
105+
106+
You can now install the ArangoDB Kubernetes operator in your Kubernetes cluster
107+
on GKE.
108+
109+
To do so, follow the [Installing kube-arangodb](./README.md#installing-kube-arangodb) instructions.
110+
111+
## Deploying your first ArangoDB database
112+
113+
Once the ArangoDB Kubernetes operator has been installed and its `Pods` are in the `Ready`
114+
state, you can launch your first ArangoDB deployment in your Kubernetes cluster
115+
on GKE.
116+
117+
To do so, follow the [Deploying your first ArangoDB database](./README.md#deploying-your-first-arangodb-database) instructions.
118+
119+
Note that GKE supports `Services` of type `LoadBalancer`.
51.2 KB
Loading
52.5 KB
Loading
48.6 KB
Loading
47.7 KB
Loading
74.5 KB
Loading
52.5 KB
Loading
29.7 KB
Loading

0 commit comments

Comments
 (0)