Installed kubernetes cluster on bare metal centos7 machine with nodes having FQDN has hostnames
Used kubectl gluster deploy gcs.yaml to install gcs
[root@benki1 ~]# kubectl get nodes
NAME STATUS ROLES AGE VERSION
benki1.lab.eng.blr.redhat.com Ready master 19h v1.13.3
benki2.lab.eng.blr.redhat.com Ready <none> 19h v1.13.3
benki3.lab.eng.blr.redhat.com Ready <none> 19h v1.13.3
benki5.lab.eng.blr.redhat.com Ready <none> 19h v1.13.3
benki6.lab.eng.blr.redhat.com Ready <none> 19h v1.13.3
[root@benki1 ~]#
GD2 pods fail with following error
[root@benki1 ~]# kubectl describe statefulset/gluster-benki2.lab.eng.blr.redhat.com -ngcs
Name: gluster-benki2.lab.eng.blr.redhat.com
....
...
Volume Claims: <none>
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Warning FailedCreate 3m26s (x26 over 8m59s) statefulset-controller create Pod gluster-benki2.lab.eng.blr.redhat.com-0 in StatefulSet gluster-benki2.lab.eng.blr.redhat.com failed error: Pod "gluster-benki2.lab.eng.blr.redhat.com-0" is invalid: spec.hostname: Invalid value: "gluster-benki2.lab.eng.blr.redhat.com-0": a DNS-1123 label must consist of lower case alphanumeric characters or '-', and must start and end with an alphanumeric character (e.g. 'my-name', or '123-abc', regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?')
Steps to reproduce
kubectl gluster deploy gcs.yaml
to install gcsGD2 pods fail with following error