July 2019
Intermediate to advanced
502 pages
14h
English
Here is a truncated version that includes the parts we should focus on.
The first part includes apiVersion, kind, metadata, and spec, as we've seen before. The name is cassandra, and the label is app: cassandra. In spec, the serviceName name is also cassandra, and there are three replicas:
apiVersion: apps/v1kind: StatefulSetmetadata: name: cassandra labels: app: cassandra spec: serviceName: cassandra replicas: 3 selector: matchLabels: app: cassandra
The pod template has a matching label of app: cassandra. The container is named cassandra, too, and uses a Google sample image with the always pull policy. Here, terminationGraceInSeconds is set to 1,800 seconds (that is, 30 minutes). That's ...