Skip to content

Instantly share code, notes, and snippets.

@initcron
Created April 14, 2022 12:05
Show Gist options
  • Save initcron/c14e6454f7d59b811f65045fc05c9907 to your computer and use it in GitHub Desktop.
Save initcron/c14e6454f7d59b811f65045fc05c9907 to your computer and use it in GitHub Desktop.
StatefuleSet version of Vote App
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: vote
labels:
role: vote
namespace: test
spec:
minReadySeconds: 20
serviceName: vote
replicas: 3
volumeClaimTemplates:
- metadata:
name: vote
spec:
accessModes: [ "ReadWriteOnce" ]
storageClassName: "nfs"
resources:
requests:
storage: 10Mi
selector:
matchLabels:
app: python
role: vote
matchExpressions:
- key: version
operator: Exists
template:
metadata:
name: vote
labels:
app: python
role: vote
version: v8
spec:
containers:
- name: app
image: schoolofdevops/vote:v8
resources:
requests:
memory: "64Mi"
cpu: "50m"
limits:
memory: "128Mi"
cpu: "250m"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment