forked from pivotal-cf/docs-tas-kubernetes
-
Notifications
You must be signed in to change notification settings - Fork 0
/
configuring-default-storage.html.md.erb
99 lines (79 loc) · 3.27 KB
/
configuring-default-storage.html.md.erb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
---
title: Configuring Default Storage
owner: Tanzu Application Service Release Engineering
---
Tanzu Application Service for Kubernetes (TAS for Kubernetes) requires the Kubernetes cluster to provide persistent volumes
for its internal PostgreSQL database and Minio blobstore.
This topic describes how to enable dynamic provisioning of persistent volumes on Kubernetes clusters
by configuring default storage on Kubernetes clusters to support TAS for Kubernetes.
## <a id='prerequisites'></a> Prerequisites
Before configuring a Kubernetes cluster default storage class, you must have:
* A default storage class in the Kubernetes cluster.
* The `kapp` utility.
See [Installing Command-Line Tools](installing-command-line-tools.html).
* If you are using a PKS-provisioned cluster, see
[Provision Dynamic PVs for Use with Enterprise PKS]
(https://docs.pivotal.io/pks/volumes.html#dynamic-pv-pks)
in _Configuring and Using PersistentVolumes_ for additional requirements.
## <a id='configuring-vsphere-storage'></a> Configure the Default Storage for PKS-Provisioned Clusters on vSphere
To configure a default storage class for a PKS-provisioned Clusters on vSphere:
1. Create a file named `vsphere-default-storage-class.yml`.
1. Populate the `vsphere-default-storage-class.yml` file with the following:
```yaml
---
kind: StorageClass
apiVersion: storage.k8s.io/v1
metadata:
name: thin
annotations:
storageclass.kubernetes.io/is-default-class: "true"
provisioner: kubernetes.io/vsphere-volume
```
1. To install the storage class, run the following command:
```
kapp deploy -a default-storage-class -f vsphere-default-storage-class.yml
```
## <a id='configuring-aws-storage'></a> Configure the Default Storage for TKG-provisioned Clusters
To configure a default storage class for a TKG-provisioned Kubernetes cluster,
follow the procedure for your IaaS:
* <a id='aws'></a>On AWS:
1. Create a file named `aws-default-storage-class.yml`.
1. Populate the `aws-default-storage-class.yml` file with the following:
```yaml
---
kind: StorageClass
apiVersion: storage.k8s.io/v1
metadata:
name: gp2
annotations:
storageclass.kubernetes.io/is-default-class: "true"
provisioner: kubernetes.io/aws-ebs
parameters:
type: gp2
fsType: ext4
```
1. To install the storage class, run:
```
kapp deploy -a default-storage-class -f aws-default-storage-class.yml
```
* <a id='tkg-vsphere'></a>On vSphere:
1. Create a file named `vsphere-default-storage-class.yml`.
1. Populate the `vsphere-default-storage-class.yml` file with the following:
```yaml
---
kind: StorageClass
apiVersion: storage.k8s.io/v1
metadata:
name: thin-csi
annotations:
storageclass.kubernetes.io/is-default-class: "true"
provisioner: csi.vsphere.vmware.com
parameters:
datastoreurl: "DATASTORE-URL"
```
Where `DATASTORE-URL` is the URL to your CSI datastore.
<br>
1. To install the storage class, run:
```
kapp deploy -a default-storage-class -f vsphere-default-storage-class.yml
```