2017-08-07 22:26:59 -07:00
---
2018-05-18 14:28:05 -07:00
title : Ceph Operator
2019-02-04 09:46:00 -08:00
weight : 10100
2017-08-07 22:26:59 -07:00
indent : true
---
2018-05-18 14:28:05 -07:00
# Ceph Operator Helm Chart
2017-08-07 22:26:59 -07:00
2018-05-18 14:28:05 -07:00
Installs [rook ](https://github.com/rook/rook ) to create, configure, and manage Ceph clusters on Kubernetes.
2017-08-07 22:26:59 -07:00
## Introduction
2018-05-18 14:28:05 -07:00
This chart bootstraps a [rook-ceph-operator ](https://github.com/rook/rook ) deployment on a [Kubernetes ](http://kubernetes.io ) cluster using the [Helm ](https://helm.sh ) package manager.
2017-08-07 22:26:59 -07:00
## Prerequisites
2018-12-19 23:42:01 -07:00
- Kubernetes 1.10+
2017-08-07 22:26:59 -07:00
2017-08-30 11:38:27 -07:00
### RBAC
If role-based access control (RBAC) is enabled in your cluster, you may need to give Tiller (the server-side component of Helm) additional permissions. **If RBAC is not enabled, be sure to set `rbacEnable` to `false` when installing the chart.**
2018-01-19 16:36:27 -08:00
```console
# Create a ServiceAccount for Tiller in the ` kube-system` namespace
2018-04-07 10:07:42 -05:00
kubectl --namespace kube-system create sa tiller
2017-08-30 11:38:27 -07:00
2018-01-19 16:36:27 -08:00
# Create a ClusterRoleBinding for Tiller
kubectl create clusterrolebinding tiller --clusterrole cluster-admin --serviceaccount=kube-system:tiller
2017-08-30 11:38:27 -07:00
2018-01-19 16:36:27 -08:00
# Patch Tiller' s Deployment to use the new ServiceAccount
2018-04-07 10:07:42 -05:00
kubectl --namespace kube-system patch deploy/tiller-deploy -p '{"spec": {"template": {"spec": {"serviceAccountName": "tiller"}}}}'
2018-01-19 16:36:27 -08:00
```
2017-08-30 11:38:27 -07:00
2017-08-10 14:52:37 -07:00
## Installing
2018-05-18 14:28:05 -07:00
The Ceph Operator helm chart will install the basic components necessary to create a storage platform for your Kubernetes cluster.
2018-07-13 14:29:57 -06:00
After the helm chart is installed, you will need to [create a Rook cluster ](ceph-quickstart.md#create-a-rook-cluster ).
2017-08-10 14:52:37 -07:00
2019-03-17 07:22:06 -06:00
The `helm install` command deploys rook on the Kubernetes cluster in the default configuration. The [configuration ](#configuration ) section lists the parameters that can be configured during installation. It is recommended that the rook operator be installed into the `rook-ceph` namespace (you will install your clusters into separate namespaces).
2018-01-19 16:36:27 -08:00
2019-04-27 22:49:11 -06:00
Rook currently publishes builds of the Ceph operator to the `release` and `master` channels.
2018-12-21 11:12:44 -08:00
2019-04-27 22:49:11 -06:00
### Release
The release channel is the most recent release of Rook that is considered stable for the community.
2018-12-21 11:12:44 -08:00
```console
2019-04-27 22:49:11 -06:00
helm repo add rook-release https://charts.rook.io/release
helm install --namespace rook-ceph rook-release/rook-ceph
2018-05-18 14:28:05 -07:00
```
2018-01-19 16:36:27 -08:00
### Master
2019-04-27 22:49:11 -06:00
The master channel includes the latest commits, with all automated tests green. Historically it has been very stable, though it is only recommended for testing.
The critical point to consider is that upgrades are not supported to or from master builds.
2017-08-10 14:52:37 -07:00
2018-01-19 16:36:27 -08:00
To install the helm chart from master, you will need to pass the specific version returned by the `search` command.
2017-08-10 14:52:37 -07:00
```console
2018-01-19 16:36:27 -08:00
helm repo add rook-master https://charts.rook.io/master
2018-05-18 14:28:05 -07:00
helm search rook-ceph
2019-03-17 07:22:06 -06:00
helm install --namespace rook-ceph rook-master/rook-ceph --version <version>
2017-08-10 14:52:37 -07:00
```
2018-01-19 16:36:27 -08:00
For example:
```
2019-03-17 07:22:06 -06:00
helm install --namespace rook-ceph rook-master/rook-ceph --version v0.7.0-278.gcbd9726
2018-01-19 16:36:27 -08:00
```
2017-08-10 14:52:37 -07:00
2018-01-19 16:36:27 -08:00
### Development Build
To deploy from a local build from your development environment:
1. Build the Rook docker image: `make`
1. Copy the image to your K8s cluster, such as with the `docker save` then the `docker load` commands
1. Install the helm chart
2017-08-10 14:52:37 -07:00
```console
2018-05-18 14:28:05 -07:00
cd cluster/charts/rook-ceph
2019-03-17 07:22:06 -06:00
helm install --namespace rook-ceph --name rook-ceph .
2017-08-10 14:52:37 -07:00
```
2017-08-07 22:26:59 -07:00
## Uninstalling the Chart
2018-05-18 14:28:05 -07:00
To uninstall/delete the `rook-ceph` deployment:
2017-08-07 22:26:59 -07:00
```console
2018-05-18 14:28:05 -07:00
$ helm delete --purge rook-ceph
2017-08-07 22:26:59 -07:00
```
The command removes all the Kubernetes components associated with the chart and deletes the release.
## Configuration
The following tables lists the configurable parameters of the rook-operator chart and their default values.
2019-02-28 20:42:06 +01:00
| Parameter | Description | Default |
| ---------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------ |
| `image.repository` | Image | `rook/ceph` |
| `image.tag` | Image tag | `master` |
| `image.pullPolicy` | Image pull policy | `IfNotPresent` |
| `rbacEnable` | If true, create & use RBAC resources | `true` |
| `pspEnable` | If true, create & use PSP resources | `true` |
| `resources` | Pod resource requests & limits | `{}` |
| `annotations` | Pod annotations | `{}` |
| `logLevel` | Global log level | `INFO` |
| `nodeSelector` | Kubernetes `nodeSelector` to add to the Deployment. | <none> |
| `tolerations` | List of Kubernetes `tolerations` to add to the Deployment. | `[]` |
2019-08-01 10:46:18 +02:00
| `currentNamespaceOnly` | Whether the operator should watch cluster CRD in its own namespace or not | `false` |
2019-02-28 20:42:06 +01:00
| `hostpathRequiresPrivileged` | Runs Ceph Pods as privileged to be able to write to `hostPath` s in OpenShift with SELinux restrictions. | `false` |
| `agent.flexVolumeDirPath` | Path where the Rook agent discovers the flex volume plugins (*) | `/usr/libexec/kubernetes/kubelet-plugins/volume/exec/` |
| `agent.libModulesDirPath` | Path where the Rook agent should look for kernel modules (*) | `/lib/modules` |
2019-07-08 11:57:29 +05:30
| `agent.mounts` | Additional paths to be mounted in the agent container (**) | <none> |
2019-02-28 20:42:06 +01:00
| `agent.mountSecurityMode` | Mount Security Mode for the agent. | `Any` |
| `agent.toleration` | Toleration for the agent pods | <none> |
| `agent.tolerationKey` | The specific key of the taint to tolerate | <none> |
2019-04-14 19:05:27 +02:00
| `agent.tolerations` | Array of tolerations in YAML format which will be added to agent deployment | <none> |
2019-07-08 11:57:29 +05:30
| `agent.nodeAffinity` | The node labels for affinity of `rook-agent` (***) | <none> |
2019-02-28 20:42:06 +01:00
| `discover.toleration` | Toleration for the discover pods | <none> |
| `discover.tolerationKey` | The specific key of the taint to tolerate | <none> |
2019-04-14 19:05:27 +02:00
| `discover.tolerations` | Array of tolerations in YAML format which will be added to discover deployment | <none> |
2019-07-08 11:57:29 +05:30
| `discover.nodeAffinity` | The node labels for affinity of `discover-agent` (***) | <none> |
2019-02-28 20:42:06 +01:00
| `mon.healthCheckInterval` | The frequency for the operator to check the mon health | `45s` |
2019-04-23 10:27:38 +08:00
| `mon.monOutTimeout` | The time to wait before failing over an unhealthy mon | `600s` |
2018-01-19 16:53:33 -08:00
2018-07-28 12:57:40 +02:00
* For information on what to set `agent.flexVolumeDirPath` to, please refer to the [Rook flexvolume documentation ](flexvolume.md )
2019-07-08 11:57:29 +05:30
* * `agent.mounts` should have this format `mountname1=/host/path:/container/path,mountname2=/host/path2:/container/path2`
* * * `agent.nodeAffinity` and `discover.nodeAffinity` should have the format `"role=storage,rook; storage=ceph"` or `storage=;role=rook-example` or `storage=;` (_checks only for presence of key_)
2017-08-07 22:26:59 -07:00
2018-01-19 16:36:27 -08:00
### Command Line
2018-04-01 18:31:47 +02:00
You can pass the settings with helm command line parameters. Specify each parameter using the
2018-01-19 16:36:27 -08:00
`--set key=value[,key=value]` argument to `helm install` . For example, the following command will install rook where RBAC is not enabled.
2017-08-07 22:26:59 -07:00
```console
2019-04-27 22:49:11 -06:00
$ helm install --namespace rook-ceph --name rook-ceph rook-release/rook-ceph --set rbacEnable = false
2017-08-07 22:26:59 -07:00
```
2018-01-19 16:36:27 -08:00
### Settings File
Alternatively, a yaml file that specifies the values for the above parameters (`values.yaml` ) can be provided while installing the chart.
2017-08-07 22:26:59 -07:00
```console
2019-04-27 22:49:11 -06:00
$ helm install --namespace rook-ceph --name rook-ceph rook-release/rook-ceph -f values.yaml
2017-08-07 22:26:59 -07:00
```
Here are the sample settings to get you started.
```yaml
image :
prefix : rook
2018-05-18 14:28:05 -07:00
repository : rook/ceph
2017-08-07 22:26:59 -07:00
tag : master
pullPolicy : IfNotPresent
resources :
limits :
cpu : 100m
memory : 128Mi
requests :
cpu : 100m
memory : 128Mi
rbacEnable : true
2018-04-25 13:35:53 -05:00
pspEnable : true
2017-08-07 22:26:59 -07:00
```