designing-distributed-systems
designing-distributed-systems copied to clipboard
apiVersion: apps/v1beta1 no longer contain "StatefulSet"
These examples are rendered useless in later versions of kuberneters due to breaking changes in apps/v1beta1. It would be kind to your readers, a group of newbs, to update the examples so that they work.
But most likely change to the current version, like apiVersion: apps/v1 for deployment with some modify would work.
an worked version:
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: sharded-redis
spec:
serviceName: "redis"
replicas: 3
selector:
matchLabels:
app: redis
template:
metadata:
labels:
app: redis
spec:
terminationGracePeriodSeconds: 10
containers:
- name: redis
image: redis
ports:
- containerPort: 6379
name: redis