StatefulSet


Purpose

1. creation order is guaranteed unless podManagementPolicy: parallel
2. pod name remain same even after restart
3. Use volumeClaimTemplate . Its an array. The content of array element is same as PVC. Each pod will get its own PV.

Headeless service will add DNS entries
- for each pod: "pod name"."headless service name"."namespace name".svc.cluster.local
Here pod IP address is not used.
- for headeless service: DNS is mapped to all pod's DNS. 

To create Headless service, specify ClusterIP: None

1. Headless service with deployment. 
Pod shall have value for subdomain as same as name of headless service.
Also specify hostname then only pod's dns name A record will be created. But all pod will have same hostname

2. To create Headless service with statefulset, no need to specify (1) subdomain (2) hostname
Instead of subdomain, we shall specify serviceName



0 comments:

Post a Comment