text stringlengths 0 59.1k |
|---|
role: web-frontend |
<|endoftext|> |
# source: k8s_examples/_archived/volumes/nfs/nfs-busybox-deployment.yaml type: yaml |
# This mounts the nfs volume claim into /mnt and continuously |
# overwrites /mnt/index.html with the time and hostname of the pod. |
apiVersion: apps/v1 |
kind: Deployment |
metadata: |
name: nfs-busybox |
spec: |
replicas: 2 |
selector: |
matchLabels: |
name: nfs-busybox |
template: |
metadata: |
labels: |
name: nfs-busybox |
spec: |
containers: |
- image: busybox |
command: |
- sh |
- -c |
- 'while true; do date > /mnt/index.html; hostname >> /mnt/index.html; sleep $(($RANDOM % 5 + 5)); done' |
imagePullPolicy: IfNotPresent |
name: busybox |
volumeMounts: |
# name must match the volume name below |
- name: nfs |
mountPath: "/mnt" |
volumes: |
- name: nfs |
persistentVolumeClaim: |
claimName: nfs |
<|endoftext|> |
# source: k8s_examples/_archived/volumes/nfs/nfs-web-deployment.yaml type: yaml |
# This pod mounts the nfs volume claim into /usr/share/nginx/html and |
# serves a simple web page. |
apiVersion: apps/v1 |
kind: Deployment |
metadata: |
name: nfs-web |
spec: |
replicas: 2 |
selector: |
matchLabels: |
role: web-frontend |
template: |
metadata: |
labels: |
role: web-frontend |
spec: |
containers: |
- name: web |
image: nginx |
ports: |
- name: web |
containerPort: 80 |
volumeMounts: |
# name must match the volume name below |
- name: nfs |
mountPath: "/usr/share/nginx/html" |
volumes: |
- name: nfs |
persistentVolumeClaim: |
claimName: nfs |
<|endoftext|> |
# source: k8s_examples/_archived/volumes/nfs/nfs-pv.yaml type: yaml |
apiVersion: v1 |
kind: PersistentVolume |
metadata: |
name: nfs |
spec: |
capacity: |
storage: 1Mi |
accessModes: |
- ReadWriteMany |
nfs: |
server: nfs-server.default.svc.cluster.local |
path: "/" |
mountOptions: |
- nfsvers=4.2 |
<|endoftext|> |
# source: k8s_examples/_archived/volumes/nfs/nfs-server-deployment.yaml type: yaml |
apiVersion: apps/v1 |
kind: Deployment |
metadata: |
name: nfs-server |
spec: |
replicas: 1 |
selector: |
matchLabels: |
role: nfs-server |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.