Is it possible to set a hostname like ambari-app ec2 internal with dots in a Kubernetes Replication Controller RC

0 votes

Case: 1)

If i put the hostname like ambari-app.ec2.internal  in Replication Controller Manifest file like below 

----

spec:

  replicas: 2

  selector:

    app: ambariapp

  template:

    metadata:

      name: ambariapppod

      labels:

        app: ambariapp

    spec:

      hostname: ambari-app.ec2.internal

      containers:

---

I am getting issue after RC executed like The ReplicationController "ambariapprc" is invalid: spec.template.spec.hostname: Invalid value: "ambari-app.ec2.internal : a lowercase RFC 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])?').

So the Replication Controller is not accepting the hostname with dots(.), 

Case:2)

I tried with hostname like ambari-app, it is working without any issue but i need hostname with dots(.) like ambari-app.ec2.internal.

So any other solutions? Kindly help me on this.

Aug 4, 2021 in Kubernetes by anonymous

edited 4 days ago 102 views

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP