text stringlengths 0 59.1k |
|---|
apiVersion: v1 |
kind: Secret |
metadata: |
name: storageos-secret |
type: "kubernetes.io/storageos" |
data: |
apiAddress: dGNwOi8vMTI3LjAuMC4xOjU3MDU= |
apiUsername: c3RvcmFnZW9z |
apiPassword: c3RvcmFnZW9z |
<|endoftext|> |
# source: k8s_examples/_archived/volumes/storageos/README.md type: docs |
# StorageOS Volume |
- [StorageOS](#storageos) |
- [Prerequisites](#prerequisites) |
- [Examples](#examples) |
- [Pre-provisioned Volumes](#pre-provisioned) |
- [Pod](#pod) |
- [Persistent Volumes](#persistent-volumes) |
- [Dynamic Provisioning](#dynamic-provisioning) |
- [Storage Class](#storage-class) |
- [API Configuration](#api-configuration) |
## StorageOS |
[StorageOS](https://www.storageos.com) can be used as a storage provider for your Kubernetes cluster. StorageOS runs as a container within your Kubernetes environment, making local storage accessible from any node within the Kubernetes cluster. Data can be replicated to protect against node failure. |
At its core, StorageOS provides block storage. You may choose the filesystem type to install to make devices usable from within containers. |
## Prerequisites |
The StorageOS container must be running on each Kubernetes node that wants to contribute storage or that wants to consume storage. For more information on how you can run StorageOS, consult the [StorageOS documentation](https://docs.storageos.com). |
## API Configuration |
The StorageOS provider has been pre-configured to use the StorageOS API defaults, and no additional configuration is required for testing. If you have changed the API port, or have removed the default account or changed its password (recommended), you must specify the new settings. This is done using Kubernetes [Secr... |
API configuration is set by using Kubernetes secrets. The configuration secret supports the following parameters: |
* `apiAddress`: The address of the StorageOS API. This is optional and defaults to `tcp://localhost:5705`, which should be correct if the StorageOS container is running using the default settings. |
* `apiUsername`: The username to authenticate to the StorageOS API with. |
* `apiPassword`: The password to authenticate to the StorageOS API with. |
* `apiVersion`: Optional, string value defaulting to `1`. Only set this if requested in StorageOS documentation. |
Mutiple credentials can be used by creating different secrets. |
For Persistent Volumes, secrets must be created in the Pod namespace. Specify the secret name using the `secretName` parameter when attaching existing volumes in Pods or creating new persistent volumes. |
For dynamically provisioned volumes using storage classes, the secret can be created in any namespace. Note that you would want this to be an admin-controlled namespace with restricted access to users. Specify the secret namespace as parameter `adminSecretNamespace` and name as parameter `adminSecretName` in storage c... |
Example spec: |
```yaml |
apiVersion: v1 |
kind: Secret |
metadata: |
name: storageos-secret |
type: "kubernetes.io/storageos" |
data: |
apiAddress: dGNwOi8vMTI3LjAuMC4xOjU3MDU= |
apiUsername: c3RvcmFnZW9z |
apiPassword: c3RvcmFnZW9z |
``` |
Values for `apiAddress`, `apiUsername` and `apiPassword` can be generated with: |
```bash |
$ echo -n "tcp://127.0.0.1:5705" | base64 |
dGNwOi8vMTI3LjAuMC4xOjU3MDU= |
``` |
Create the secret: |
```bash |
$ kubectl create -f storageos-secret.yaml |
secret "storageos-secret" created |
``` |
Verify the secret: |
```bash |
$ kubectl describe secret storageos-secret |
Name: storageos-secret |
Namespace: default |
Labels: <none> |
Annotations: <none> |
Type: kubernetes.io/storageos |
Data |
==== |
apiAddress: 20 bytes |
apiPassword: 8 bytes |
apiUsername: 8 bytes |
``` |
## Examples |
These examples assume you have a running Kubernetes cluster with the StorageOS container running on each node, and that an API configuration secret called `storageos-secret` has been created in the `default` namespace. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.