From bdeb6175a9ffae66bb8b155d15a69416a88f8fa2 Mon Sep 17 00:00:00 2001 From: sleto-it <31849787+sleto-it@users.noreply.github.com> Date: Fri, 6 Apr 2018 14:26:33 +0200 Subject: [PATCH] Doc - Updates kube doc (#5051) --- .../Kubernetes/DeploymentResource.md | 2 +- .../Manual/Deployment/Kubernetes/Metrics.md | 9 ++++++++- .../Manual/Deployment/Kubernetes/Storage.md | 8 ++++++-- .../Manual/Deployment/Kubernetes/Usage.md | 19 ++++++++++++------- .../Manual/Tutorials/Kubernetes/README.md | 7 +++++++ 5 files changed, 34 insertions(+), 11 deletions(-) diff --git a/Documentation/Books/Manual/Deployment/Kubernetes/DeploymentResource.md b/Documentation/Books/Manual/Deployment/Kubernetes/DeploymentResource.md index d1bd0a9bee..c5ca3669a8 100644 --- a/Documentation/Books/Manual/Deployment/Kubernetes/DeploymentResource.md +++ b/Documentation/Books/Manual/Deployment/Kubernetes/DeploymentResource.md @@ -1,5 +1,5 @@ -# ArangoLocalStorage Custom Resource +# ArangoDeployment Custom Resource The ArangoDB Deployment Operator creates and maintains ArangoDB deployments in a Kubernetes cluster, given a deployment specification. diff --git a/Documentation/Books/Manual/Deployment/Kubernetes/Metrics.md b/Documentation/Books/Manual/Deployment/Kubernetes/Metrics.md index 42682fc24e..3aea330c14 100644 --- a/Documentation/Books/Manual/Deployment/Kubernetes/Metrics.md +++ b/Documentation/Books/Manual/Deployment/Kubernetes/Metrics.md @@ -1,4 +1,11 @@ # Metrics -TBD +The ArangoDB Kubernetes Operator (`kube-arangodb`) exposes metrics of +its operations in a format that is compatible with [Prometheus](https://prometheus.io). + +The metrics are exposed through HTTPS on port `8528` under path `/metrics`. + +Look at [examples/metrics](https://github.com/arangodb/kube-arangodb/tree/master/examples/metrics) +for examples of `Services` and `ServiceMonitors` you can use to integrate +with Prometheus through the [Prometheus-Operator by CoreOS](https://github.com/coreos/prometheus-operator). diff --git a/Documentation/Books/Manual/Deployment/Kubernetes/Storage.md b/Documentation/Books/Manual/Deployment/Kubernetes/Storage.md index dfc9fa679d..933d2f4d34 100644 --- a/Documentation/Books/Manual/Deployment/Kubernetes/Storage.md +++ b/Documentation/Books/Manual/Deployment/Kubernetes/Storage.md @@ -7,7 +7,7 @@ the storage to Pods that need them. ## Storage configuration -In the cluster resource, one can specify the type of storage +In the `ArangoDeployment` resource, one can specify the type of storage used by groups of servers using the `spec..storageClassName` setting. @@ -23,7 +23,11 @@ server. For optimal performance, ArangoDB should be configured with locally attached SSD storage. -To accomplish this, one must create `PersistentVolumes` for all servers that +The easiest way to accomplish this is to deploy an +[`ArangoLocalStorage` resource](./StorageResource.md). +The ArangoDB Storage Operator will use it to provide `PersistentVolumes` for you. + +The alternative is to create `PersistentVolumes` manually, for all servers that need persistent storage (single, agents & dbservers). E.g. for a `Cluster` with 3 agents and 5 dbservers, you must create 8 volumes. diff --git a/Documentation/Books/Manual/Deployment/Kubernetes/Usage.md b/Documentation/Books/Manual/Deployment/Kubernetes/Usage.md index 13d1088369..7f6ed60607 100644 --- a/Documentation/Books/Manual/Deployment/Kubernetes/Usage.md +++ b/Documentation/Books/Manual/Deployment/Kubernetes/Usage.md @@ -4,25 +4,30 @@ ## Installation The ArangoDB Kubernetes Operator needs to be installed in your Kubernetes -cluster first. To do so, clone this repository and run: +cluster first. + +To do so, run (replace `` with the version of the operator that you want to install): ```bash -kubectl apply -f manifests/crd.yaml -kubectl apply -f manifests/arango-deployment.yaml +kubectl apply -f https://raw.githubusercontent.com/arangodb/kube-arangodb//manifests/crd.yaml +kubectl apply -f https://raw.githubusercontent.com/arangodb/kube-arangodb//manifests/arango-deployment.yaml ``` To use `ArangoLocalStorage`, also run: ```bash -kubectl apply -f manifests/arango-storage.yaml +kubectl apply -f https://raw.githubusercontent.com/arangodb/kube-arangodb//manifests/arango-storage.yaml ``` +You can find the latest release of the ArangoDB Kubernetes Operator +[in the kube-arangodb repository](https://github.com/arangodb/kube-arangodb/releases/latest). + ## Cluster creation Once the operator is running, you can create your ArangoDB cluster by creating a custom resource and deploying it. -For example: +For example (all examples can be found [in the kube-arangodb repository](https://github.com/arangodb/kube-arangodb/tree/master/examples)): ```bash kubectl apply -f examples/simple-cluster.yaml @@ -45,7 +50,7 @@ To remove the entire ArangoDB Kubernetes Operator, remove all clusters first and then remove the operator by running: ```bash -kubectl delete -f manifests/arango-deployment.yaml +kubectl delete deployment arango-deployment-operator # If `ArangoLocalStorage` is installed -kubectl delete -f manifests/arango-storage.yaml +kubectl delete deployment -n kube-system arango-storage-operator ``` diff --git a/Documentation/Books/Manual/Tutorials/Kubernetes/README.md b/Documentation/Books/Manual/Tutorials/Kubernetes/README.md index e6676decda..0a8aa1f43d 100644 --- a/Documentation/Books/Manual/Tutorials/Kubernetes/README.md +++ b/Documentation/Books/Manual/Tutorials/Kubernetes/README.md @@ -40,6 +40,8 @@ Then run (replace `` with the version of the operator that you want to ```bash kubectl apply -f https://raw.githubusercontent.com/arangodb/kube-arangodb//manifests/crd.yaml kubectl apply -f https://raw.githubusercontent.com/arangodb/kube-arangodb//manifests/arango-deployment.yaml +# Optional +kubectl apply -f https://raw.githubusercontent.com/arangodb/kube-arangodb//manifests/arango-storage.yaml ``` The first command installs two `CustomResourceDefinitions` in your Kubernetes cluster: @@ -50,6 +52,11 @@ The first command installs two `CustomResourceDefinitions` in your Kubernetes cl The second command installs a `Deployment` that runs the operator that controls `ArangoDeployment` resources. +The optional third command installs a `Deployment` that runs the operator that +provides `PersistentVolumes` on local disks of the cluster nodes. +Use this when running on bare-metal or if there is no provisioner for fast +storage in your Kubernetes cluster. + ## Deploying your first ArangoDB database The first database we are going to deploy is a single server database.