Frédéric,

Exactly what I was looking for, thank you!

On Sat, Apr 28, 2018 at 4:59 AM, Frederic Giloux <[email protected]> wrote:

> Hi Jason,
>
> not sure if that's what you are after but you could interrogate the master
> API from inside the container:
> curl --cacert /var/run/secrets/kubernetes.io/serviceaccount/ca.crt
> https://$KUBERNETES_SERVICE_HOST:$KUBERNETES_SERVICE_PORT/
> version/openshift
>
> Regards,
>
> Frédéric
>
> On Fri, Apr 27, 2018 at 6:17 PM, Jason O'Donnell <[email protected]>
> wrote:
>
>> Hello!
>>
>> I'm wondering if there's a reliable way to detect if my container is
>> running on OpenShift.
>>
>> Currently I'm trying to determine if container code is running on one of
>> the three platforms we support: Docker, Kubernetes and OpenShift.  I've
>> found fingerprints for both Docker and Kubernetes but not OpenShift
>> (besides USER being part of the root group, but this feels weak).
>>
>> Thanks!
>>
>> _______________________________________________
>> users mailing list
>> [email protected]
>> http://lists.openshift.redhat.com/openshiftmm/listinfo/users
>>
>>
>
>
> --
> *Frédéric Giloux*
> Principal App Dev Consultant
> Red Hat Germany
>
> [email protected]     M: +49-174-172-4661
>
> redhat.com | TRIED. TESTED. TRUSTED. | redhat.com/trusted
> ________________________________________________________________________
> Red Hat GmbH, http://www.de.redhat.com/ Sitz: Grasbrunn,
> Handelsregister: Amtsgericht München, HRB 153243
> Geschäftsführer: Paul Argiry, Charles Cachera, Michael Cunningham, Michael
> O'Neill
>
_______________________________________________
users mailing list
[email protected]
http://lists.openshift.redhat.com/openshiftmm/listinfo/users

Reply via email to