1 2 3 4 5 6 7 8 9 10 11 12 13 | apiVersion: v1 kind: Service metadata: name: headless-svc labels: app: headless-svc spec: ports: - name: http port: 80 clusterIP: None selector: app: test-sts | cs |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | apiVersion: apps/v1 kind: StatefulSet metadata: name: test-sts spec: selector: matchLabels: app: test-sts serviceName: headless-svc replicas: 3 template: metadata: labels: app: test-sts spec: containers: - name: zero image: nginx ports: - containerPort: 8080 | cs |
test-sts-n
형식으로 생성