This commit is contained in:
baschno
2025-08-11 20:31:16 +02:00
parent cca6f599d5
commit 8cb83ffd9c
4 changed files with 29 additions and 22 deletions

View File

@@ -1,22 +1,3 @@
apiVersion: v1
kind: Service
metadata:
name: nginx
namespace: test
labels:
app: nginx
spec:
ports:
- port: 80
name: web
clusterIP: None
selector:
app: nginx
template:
spec:
nodeSelector:
node.longhorn.io/create-default-disk: "true" # this is required to create a disk on the node
---
apiVersion: apps/v1
kind: StatefulSet
@@ -24,8 +5,6 @@ metadata:
name: web
namespace: test
spec:
nodeSelector:
node.longhorn.io/create-default-disk: "true" # this is required to create a disk on the node
selector:
matchLabels:
app: nginx # has to match .spec.template.metadata.labels

18
statefulset/svc.yaml Normal file
View File

@@ -0,0 +1,18 @@
apiVersion: v1
kind: Service
metadata:
name: nginx
namespace: test
labels:
app: nginx
spec:
ports:
- port: 80
name: web
clusterIP: None
selector:
app: nginx
template:
spec:
nodeSelector:
node.longhorn.io/create-default-disk: "true" # this is required to create a disk on the node