Re: [kubernetes-users] Get Deployment annotation from a Kubernetes Pod

2018-05-01 Thread 'Ahmet Alp Balkan' via Kubernetes user discussion and Q
I'm not entirely sure if a Pod inherits the annotations of its owner (i.e. Deployment). Based on my experimentation it doesn't. That said, the downward API lets you read fields

Re: [kubernetes-users] Get Deployment annotation from a Kubernetes Pod

2018-05-01 Thread Kir Shatrov
Thanks for suggestion. I know there's a REST API or kubectl available inside the pod, but I was wondering if it could be exposed in a different way, perhaps similar to Downward API. On Tue, May 1, 2018 at 8:52 PM, David Rosenstrauch wrote: > Actually, my bad - I didn't read

Re: [kubernetes-users] Get Deployment annotation from a Kubernetes Pod

2018-05-01 Thread David Rosenstrauch
Actually, my bad - I didn't read your question carefully enough. You wanted to access that annotation, but from inside a pod. That can be done too. I've run scripts inside a pod that query the kubernetes api server for information like that. I don't have a code example for that handy,

[kubernetes-users] Get Deployment annotation from a Kubernetes Pod

2018-05-01 Thread Kir Shatrov
Hi all, I'm looking for some help with exposing annotations. Each Deployment gets this annotation: $ kubectl describe deployment/myapp Name: myapp Namespace: default CreationTimestamp: Sat, 24 Mar 2018 23:27:42 +0100 Labels: app=myapp