Skip to content

Instantly share code, notes, and snippets.

@isra17
Created May 13, 2020 13:42
Show Gist options
  • Save isra17/ead482c2c5230e78d3d80be44877bfe0 to your computer and use it in GitHub Desktop.
Save isra17/ead482c2c5230e78d3d80be44877bfe0 to your computer and use it in GitHub Desktop.
apiVersion: v1
kind: Service
metadata:
name: test-service
labels:
name: test
spec:
clusterIP: None
selector:
name: test
---
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: test-statefulset
labels:
name: test
spec:
serviceName: test-service
replicas: 1
selector:
matchLabels:
name: test
template:
metadata:
labels:
name: test
spec:
containers:
- name: ubuntu
image: k8s.gcr.io/echoserver:1.4
imagePullPolicy: IfNotPresent
volumeMounts:
- mountPath: /volume
subPath: subpath
name: test-volume-claim
readOnly: false
volumeClaimTemplates:
- metadata:
name: test-volume-claim
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Mi
selector:
matchLabels:
name: test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment