StorageOS is a software-based storage platform designed for cloud-native applications. By deploying StorageOS on your Kubernetes cluster, local storage from cluster node is aggregated into a distributed pool, and persistent volumes created from it using the native Kubernetes volume driver are available instantly to pods wherever they move in the cluster.
Features such as replication, encryption and caching help protect data and maximise performance.
$ git clone https://github.com/storageos/helm-chart.git storageos
$ cd storageos
$ helm install .
# Follow the instructions printed by helm install to update the link between Kubernetes and StorageOS. They look like:
$ ClusterIP=$(kubectl get svc/storageos --namespace kube-system -o custom-columns=IP:spec.clusterIP --no-headers=true)
$ ApiAddress=$(echo -n "tcp://$ClusterIP:5705" | base64)
$ kubectl patch secret/storageos-api --namespace kube-system --patch "{\"data\":{\"apiAddress\": \"$ApiAddress\"}}"
IMPORTANT: The StorageOS api address must be manually set in the api.address
value. Set this to the ip address of one of the Kubernetes nodes, e.g.
http://10.0.0.1:5705
.
This introduces a single point of failure which we hope to remove by
auto-populating a list of nodes or a service address. The ip address (or
hostname) given here MUST be accesible by the Kubernetes master, which may not
be running the StorageOS service (http://127.0.0.1:5705
will work otherwise).
Example in values.yaml:
api:
secretName: storageos-api
secretNamespace: default
# address should be set to the external service address/name as it needs to be
# accessible by the Kubernetes master.
address: http://10.0.0.1:5705
- Kubernetes 1.8+ with Beta APIs enabled
- Kubernetes must be configured to allow:
- Privileged mode containers (enabled by default)
- Feature gate: MountPropagation=true. This can be done by appending
--feature-gates MountPropagation=true
to the kube-apiserver and kubelet services.
To install the chart with the release name my-release
:
$ helm install --name my-release .
The command deploys StorageOS on the Kubernetes cluster in the default configuration. The configuration section lists the parameters that can be configured during installation.
Tip: List all releases using
helm list
Follow the instructions printed by helm install to update the link between Kubernetes and StorageOS.
Example:
$ ClusterIP=$(kubectl get svc/storageos --namespace kube-system -o custom-columns=IP:spec.clusterIP --no-headers=true)
$ ApiAddress=$(echo -n "tcp://$ClusterIP:5705" | base64)
$ kubectl patch secret/storageos-api --namespace kube-system --patch "{\"data\":{\"apiAddress\": \"$ApiAddress\"}}"
To uninstall/delete the my-release
deployment:
$ helm delete --purge my-release
The command removes all the Kubernetes components associated with the chart and deletes the release.
The cluster.join
parameter must be set to a valid join string. The join string helps bootstrap a new cluster and
provides instructions to nodes joining an existing cluster. Typically the join string should be composed of a cluster
id and/or hostname(s)/IP-address(es) of cluster nodes. For helm options the comma needs to be escaped like this "a,b".
Examples:
$ helm install . --name my-release --set cluster.join=node01
$ storageos cluster create
61e476d0-5905-4be8-af33-d5109784e3d3
$ helm install . --name my-release --set cluster.join=61e476d0-5905-4be8-af33-d5109784e3d3
$ helm install . --name my-release --set cluster.join="61e476d0-5905-4be8-af33-d5109784e3d3\,node01"
The first item in the list can be a cluster id as above, or a hostname or ip address of a single node in the cluster.
A cluster id can be generated by running the storageos cluster create
CLI command. The CLI is available to download
from the Github repository.
Alternatively, set the first item in the list to be the ip address or hostname of one of the cluster nodes. This node will boostrap the cluster when StorageOS is started for the first time on it. It only serves a special purpose until the cluster has initialised.
The remaining items in the join list should be one or more hostnames or ip addresses for new node to join to.
Tip: Future releases will remove the requirement to specify
cluster.join
and instead the discovery service will run as part of the deployment.
The following tables lists the configurable parameters of the StorageOS chart and their default values.
Parameter | Description | Default |
---|---|---|
cluster.join |
The cluster join string. See cluster discovery documentation for details. | |
image.repository |
StorageOS container image repository | storageos/node |
image.tag |
StorageOS container image tag | latest |
image.pullPolicy |
StorageOS container image pull policy | IfNotPresent |
storageclass.name |
StorageOS storage class name | fast |
storageclass.pool |
Default storage pool for storage class | default |
storageclass.fsType |
Default filesystem type for storage class | ext4 |
api.secretName |
Name of the secret used for storing api location and credentials | storageos-api |
api.secretNamespace |
Namespace of the secret used for storing api location and credentials. Needed in every namespace to use StorageOS. | default |
api.address |
Hostname or IP address of the external StorageOS api endpoint. This must be accessible from the Kubernetes master. | http://storageosapi:5705 |
api.username |
Username to authenticate to the StorageOS api with | storageos |
api.password |
Password to authenticate to the StorageOS api with | storageos |
service.name |
Name of the StorageOS service | storageos |
service.externalPort |
External service port | 5705 |
service.internalPort |
Internal service port | 5705 |
resources |
Pod resource requests & limits | {} |
Specify each parameter using the --set key=value[,key=value]
argument to helm install
. For example,
$ helm install . --name my-release \
--set cluster.join="74e8b44d-b1df-11e7-b0b3-42010a9a00b2\,node01"
Alternatively, a YAML file that specifies the values for the above parameters can be provided while installing the chart. For example,
$ helm install . --name my-release -f values.yaml
Tip: You can use the default values.yaml