April 2018
Intermediate to advanced
468 pages
14h 34m
English
There are several pieces that need to be configured correctly in order to have a working StatefulSet:
Here is an example of a service called nginx that will be used for a StatefulSet:
apiVersion: v1
kind: Service
metadata:
name: nginx
labels:
app: nginx
spec:
ports:
- port: 80
name: web
clusterIP: None
selector:
app: nginx
Now, the StatefulSet configuration file will reference the service:
apiVersion: apps/v1 kind: StatefulSet metadata: name: web spec: serviceName: "nginx" replicas: 3 template: metadata: labels: ...
Read now
Unlock full access