Created
June 28, 2020 16:58
-
-
Save wuestkamp/b206c43792258b9137286a2b480904e8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: nginx | |
spec: | |
ports: | |
- port: 80 | |
name: sts | |
clusterIP: None | |
selector: | |
app: nginx | |
--- | |
apiVersion: apps/v1 | |
kind: StatefulSet | |
metadata: | |
name: sts | |
spec: | |
selector: | |
matchLabels: | |
app: nginx | |
serviceName: nginx | |
replicas: 3 | |
template: | |
metadata: | |
labels: | |
app: nginx | |
spec: | |
terminationGracePeriodSeconds: 10 | |
containers: | |
- name: nginx | |
image: nginx | |
ports: | |
- containerPort: 80 | |
name: web | |
volumeMounts: | |
- name: sts | |
mountPath: /usr/share/nginx/html | |
volumeClaimTemplates: | |
- metadata: | |
name: sts | |
spec: | |
accessModes: [ "ReadWriteOnce" ] | |
resources: | |
requests: | |
storage: 3Gi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment