87 lines
2.1 KiB
YAML
87 lines
2.1 KiB
YAML
# Copyright 2026 Schwarz Digits Cloud GmbH & Co. KG
|
|
#
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
# you may not use this file except in compliance with the License.
|
|
# You may obtain a copy of the License at
|
|
#
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
#
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
# See the License for the specific language governing permissions and
|
|
# limitations under the License.
|
|
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: rwx-test
|
|
labels:
|
|
app: rwx-test
|
|
spec:
|
|
ports:
|
|
- port: 80
|
|
type: LoadBalancer
|
|
selector:
|
|
app: rwx-test
|
|
---
|
|
apiVersion: v1
|
|
kind: PersistentVolumeClaim
|
|
metadata:
|
|
name: rwx-test
|
|
namespace: default
|
|
spec:
|
|
accessModes:
|
|
- ReadWriteMany
|
|
storageClassName: nfs-client
|
|
resources:
|
|
requests:
|
|
storage: 10Gi
|
|
---
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: rwx-test
|
|
labels:
|
|
app: rwx-test
|
|
namespace: default
|
|
spec:
|
|
replicas: 4
|
|
selector:
|
|
matchLabels:
|
|
app: rwx-test
|
|
strategy:
|
|
type: Recreate
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: rwx-test
|
|
spec:
|
|
containers:
|
|
- image: ubuntu:focal
|
|
imagePullPolicy: IfNotPresent
|
|
command: ["/bin/sh", "-c"]
|
|
args:
|
|
- sleep 10; touch /data/index.html; while true; do echo "<p> Hostname $HOSTNAME</p><p>Date $(date)</p><br/>" >> /data/index.html; sleep 1; done;
|
|
name: rwx-test
|
|
stdin: true
|
|
tty: true
|
|
resources: {}
|
|
volumeMounts:
|
|
- mountPath: /data
|
|
name: rwx-test
|
|
- image: nginx:stable
|
|
imagePullPolicy: IfNotPresent
|
|
name: nginx
|
|
ports:
|
|
- containerPort: 80
|
|
name: http
|
|
resources: {}
|
|
volumeMounts:
|
|
- mountPath: /usr/share/nginx/html
|
|
name: rwx-test
|
|
restartPolicy: Always
|
|
volumes:
|
|
- name: rwx-test
|
|
persistentVolumeClaim:
|
|
claimName: rwx-test
|