I have a _very_ n00b question as I'm just getting into Kubernetes (from docker 
swarm land).

As part of our deployment we have a script that will generate a unique ID 
(Deployment ID) when deploying a new swarm deployment and as part of this 
deployment all services and containers in the swarm deployed as part of the 
deployment will have this ID.  The ID as both part of the service label and 
each container as this as a label.  This label is added post docker build (i.e. 
it's not on the container when build and pushed to the registry, only when its 
deployed as an instance in a swarm by the Swarm using the ServiceSpec).

We use this ID to track unique containers across various deployments so we can 
track lifecycle statistics, deployments, etc.  We can also link the metadata 
around each container and deployment with this ID.

I'm trying to see how this could translate into the Kubernetes world.  What 
would be the canonical way to do something like this in Kubernetes?  Since it 
seems like Kubernetes as the concept of a deployment (where Swarm really 
doesn't) object I assume that theres a way to easily figure out all the pods, 
etc as part of that?  Or maybe a reverse question, if a container had access to 
the Kubernetes API at runtime, could it query using this ID (somehow it would 
need to know it's own deployment ID) and then get all the Pods from it?

Any directions, recommendations, suggestions very welcome.

Thank you.
Jeff

-- 
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.

Reply via email to