designing-distributed-systems icon indicating copy to clipboard operation
designing-distributed-systems copied to clipboard

apiVersion: apps/v1beta1 no longer contain "StatefulSet"

Open browdues opened this issue 5 years ago • 2 comments

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.

browdues avatar Dec 21 '20 15:12 browdues

But most likely change to the current version, like apiVersion: apps/v1 for deployment with some modify would work.

firstim avatar Feb 25 '21 18:02 firstim

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

shadowedge avatar Oct 04 '21 09:10 shadowedge