If it's checking the domain suffix, everything should work if you set the
cluster domain to a subdomain of yours instead of cluster.local – then the
name will be of the form <pod>.<namespace>.pod.<subdomain>.<domain>, no? We
use this in all our clusters, but we make a custom distribution, so how to
do this will depend on how you build the cluster(s).

Or, dirty but simple, can you manipulate the pod hostname and domain from
inside the pod? Call `hostname` and mess with /etc/hosts?

/MR

On Tue, Sep 5, 2017, 23:05 Brandon Philips <brandon.phil...@coreos.com>
wrote:

> That won't do what he wants, I don't think.
>
> $ kubectl run -i -t busybox --image=busybox --restart=Never -n
> team-tectonic --overrides='{ "apiVersion": "v1", "spec": {"hostname":
> "hello", "subdomain": "example"}}'
> If you don't see a command prompt, try pressing enter.
> / # hostname -f
> hello.example.team-tectonic.svc.cluster.local
> / #
>
> Essentially he wants hostname and subdomain to combine and set the FQDN.
> Not just the start of the FQDN. E.g. hello.example
>
> Brandon
>
> On Tue, Sep 5, 2017 at 1:50 PM 'Tim Hockin' via Kubernetes user discussion
> and Q&A <kubernetes-users@googlegroups.com> wrote:
>
>>
>> https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/#a-records-and-hostname-based-on-pods-hostname-and-subdomain-fields
>>
>> ?
>>
>> On Tue, Sep 5, 2017 at 1:41 PM, David Rosenstrauch <dar...@darose.net>
>> wrote:
>> > Is it possible to make Kubernetes assign fully-qualified domain names to
>> > pods at launch?  I know Docker supports this using the "-h" flag (e.g.,
>> > "docker run -h host1234.ourdomain.com ...") but I don't see a
>> corresponding
>> > way to trigger that functionality in containers launched by k8s.
>> >
>> > We have a requirement for this, as we have piece of software for which
>> we
>> > have a site license that we want to containerize.  However the s/w does
>> the
>> > site license verification by checking the domain suffix of the host it's
>> > running on.  (I.e., using "hostname -f")  So if we can't get our pods
>> and
>> > services to use the domain name suffix, we won't be able to run the app
>> > inside a container.
>> >
>> > I've searched a bit, but don't see a definitive solution to the issue.
>> Any
>> > suggestions much appreciated!
>> >
>> > Thanks,
>> >
>> > DR
>> >
>> > --
>> > You received this message because you are subscribed to the Google
>> Groups
>> > "Kubernetes user discussion and Q&A" group.
>> > To unsubscribe from this group and stop receiving emails from it, send
>> an
>> > email to kubernetes-users+unsubscr...@googlegroups.com.
>> > To post to this group, send email to kubernetes-users@googlegroups.com.
>> > Visit this group at https://groups.google.com/group/kubernetes-users.
>> > For more options, visit https://groups.google.com/d/optout.
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Kubernetes user discussion and Q&A" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to kubernetes-users+unsubscr...@googlegroups.com.
>> To post to this group, send email to kubernetes-users@googlegroups.com.
>> Visit this group at https://groups.google.com/group/kubernetes-users.
>> For more options, visit https://groups.google.com/d/optout.
>>
> --
> You received this message because you are subscribed to the Google Groups
> "Kubernetes user discussion and Q&A" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to kubernetes-users+unsubscr...@googlegroups.com.
> To post to this group, send email to kubernetes-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/kubernetes-users.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Kubernetes user discussion and Q&A" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to kubernetes-users+unsubscr...@googlegroups.com.
To post to this group, send email to kubernetes-users@googlegroups.com.
Visit this group at https://groups.google.com/group/kubernetes-users.
For more options, visit https://groups.google.com/d/optout.
  • [kubernetes-users]... David Rosenstrauch
    • Re: [kubernet... 'Tim Hockin' via Kubernetes user discussion and Q&A
      • Re: [kube... Brandon Philips
        • Re: [... Matthias Rampke
          • R... David Rosenstrauch
            • ... Matthias Rampke
              • ... David Rosenstrauch
                • ... Rodrigo Campos
        • Re: [... 'Tim Hockin' via Kubernetes user discussion and Q&A
        • Re: [... David Rosenstrauch
          • R... 'Tim Hockin' via Kubernetes user discussion and Q&A
            • ... David Rosenstrauch
            • ... David Rosenstrauch
              • ... Matthias Rampke

Reply via email to