Skip to content

Commit 1e3912c

Browse files
State persistence
1 parent 667a780 commit 1e3912c

File tree

2 files changed

+34
-3
lines changed

2 files changed

+34
-3
lines changed

docs/openshift/services-networking/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,5 +127,5 @@ spec:
127127
| Task | Description | Link |
128128
| --------------------------------| ------------------ |:----------- |
129129
| *** Try It Yourself *** | | |
130-
| Creating Services | Create two services with certain requirements. | [Setting up Services](../kube-overview/activities/labs/lab8) |
131-
| IKS Ingress Controller | Configure Ingress on Free IKS Cluster | [Setting IKS Ingress](../kube-overview/activities/labs/ingress-iks) |
130+
| Creating Services | Create two services with certain requirements. | [Setting up Services](../../labs/kubernetes/lab8/index.md) |
131+
| IKS Ingress Controller | Configure Ingress on Free IKS Cluster | [Setting IKS Ingress](../../labs/kubernetes/ingress-iks/index.md) |
Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,40 @@
11
# State Persistence
22

3+
State persistence in the context of Kubernetes/OpenShift refers to the ability to maintain and retain the state or data of applications even when they are stopped, restarted, or moved between nodes. This is achieved through the use of volumes, persistent volumes (PVs), and persistent volume claims (PVCs). Volumes provide a way to store and access data in a container, while PVs serve as the underlying storage resources provisioned by the cluster. PVCs act as requests made by applications for specific storage resources from the available PVs. By utilizing PVs and PVCs, applications can ensure that their state is preserved and accessible across pod restarts and migrations, enabling reliable and consistent data storage and retrieval throughout the cluster.
4+
5+
## Resources
6+
7+
8+
[Volumes :fontawesome-solid-globe:](https://kubernetes.io/docs/concepts/storage/volumes/){ .md-button target="_blank"}
9+
10+
[Persistent Volumes :fontawesome-solid-globe:](https://kubernetes.io/docs/concepts/storage/persistent-volumes/){ .md-button target="_blank"}
11+
12+
[Persistent Volume Claims :fontawesome-solid-globe:](https://kubernetes.io/docs/concepts/storage/persistent-volumes/#persistentvolumeclaims){ .md-button target="_blank"}
13+
14+
## References
15+
16+
```yaml
17+
apiVersion: v1
18+
kind: PersistentVolumeClaim
19+
metadata:
20+
name: my-pvc
21+
spec:
22+
accessModes:
23+
- ReadWriteOnce
24+
resources:
25+
requests:
26+
storage: 1Gi
27+
```
28+
In this example, we define a PVC named my-pvc with the following specifications:
29+
30+
accessModes specify that the volume can be mounted as read-write by a single node at a time (ReadWriteOnce).
31+
resources.requests.storage specifies the requested storage size for the PVC (1Gi).
32+
33+
334
## Activities
435
536
| Task | Description | Link |
637
| --------------------------------| ------------------ |:----------- |
738
| *** Try It Yourself *** | |
8-
| Setting up Persistent Volumes | Create a Persistent Volume that's accessible from a SQL Pod. | [Setting up Persistent Volumes](../labs/kube-overview/activities/labs/lab10/index.md) |
39+
| Setting up Persistent Volumes | Create a Persistent Volume that's accessible from a SQL Pod. | [Setting up Persistent Volumes](../../labs/kubernetes/lab10/index.md) |
940

0 commit comments

Comments
 (0)