mirror of
https://github.com/jpetazzo/container.training.git
synced 2026-07-22 06:16:31 +00:00
Move storage class to portworx manifest
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
# SOURCE: https://install.portworx.com/?kbver=1.15.2&b=true&s=/dev/loop4&c=px-workshop&stork=true&lh=true&st=k8s&mc=false
|
||||
# SOURCE: https://install.portworx.com/?kbver=1.15.2&b=true&s=/dev/loop4&c=px-workshop&stork=true&lh=true&st=k8s&mc=false
|
||||
---
|
||||
kind: Service
|
||||
apiVersion: v1
|
||||
@@ -751,3 +750,16 @@ spec:
|
||||
volumes:
|
||||
- name: config
|
||||
emptyDir: {}
|
||||
---
|
||||
# That one is an extra.
|
||||
# Create a default Storage Class to simplify Portworx setup.
|
||||
kind: StorageClass
|
||||
apiVersion: storage.k8s.io/v1beta1
|
||||
metadata:
|
||||
name: portworx-replicated
|
||||
annotations:
|
||||
storageclass.kubernetes.io/is-default-class: "true"
|
||||
provisioner: kubernetes.io/portworx-volume
|
||||
parameters:
|
||||
repl: "2"
|
||||
priority_io: "high"
|
||||
|
||||
@@ -240,6 +240,25 @@ If you want to use an external key/value store, add one of the following:
|
||||
|
||||
---
|
||||
|
||||
## Check our default Storage Class
|
||||
|
||||
- The YAML manifest applied earlier should define a default storage class
|
||||
|
||||
.exercise[
|
||||
|
||||
- Check that we have a default storage class:
|
||||
```bash
|
||||
kubectl get storageclass
|
||||
```
|
||||
|
||||
]
|
||||
|
||||
There should be a storage class showing as `portworx-replicated (default)`.
|
||||
|
||||
---
|
||||
|
||||
class: extra-details
|
||||
|
||||
## Our default Storage Class
|
||||
|
||||
This is our Storage Class (in `k8s/storage-class.yaml`):
|
||||
@@ -265,28 +284,6 @@ parameters:
|
||||
|
||||
---
|
||||
|
||||
## Creating our Storage Class
|
||||
|
||||
- Let's apply that YAML file!
|
||||
|
||||
.exercise[
|
||||
|
||||
- Create the Storage Class:
|
||||
```bash
|
||||
kubectl apply -f ~/container.training/k8s/storage-class.yaml
|
||||
```
|
||||
|
||||
- Check that it is now available:
|
||||
```bash
|
||||
kubectl get sc
|
||||
```
|
||||
|
||||
]
|
||||
|
||||
It should show as `portworx-replicated (default)`.
|
||||
|
||||
---
|
||||
|
||||
## Our Postgres Stateful set
|
||||
|
||||
- The next slide shows `k8s/postgres.yaml`
|
||||
@@ -326,7 +323,7 @@ spec:
|
||||
schedulerName: stork
|
||||
containers:
|
||||
- name: postgres
|
||||
image: postgres:10.5
|
||||
image: postgres:11
|
||||
volumeMounts:
|
||||
- mountPath: /var/lib/postgresql/data
|
||||
name: postgres
|
||||
|
||||
Reference in New Issue
Block a user