4 ms·
Uhhh... > Instead, Kubernetes annotations are meant for sharing information with other colleagues. For example, you may use an annotation to record the phone
by alexjplant 5y ago
Uhhh...
> Instead, Kubernetes annotations are meant for sharing information with other colleagues. For example, you may use an annotation to record the phone number of the person responsible for a pod
...wat? The k8s docs say
> You can use Kubernetes annotations to attach arbitrary non-identifying metadata to objects. Clients such as tools and libraries can retrieve this metadata.
I've only ever seen them used in this fashion, i.e. declarative configuration facilitated by the control plane. Furthermore why would you have a _phone number_ as an annotation on a _pod_? If you're managing pods individually without a controller of some sort then you'd better have a really good reason.
- GauntletWizard 5y agoI wouldn't use it on a pod directly, but I recommend that annotations on deployments include the oncall rotation that is responsible for them - And there's no real reason not to cascade that down onto pods as well.
- wdb 5y agoInteresting, do you have an example how this would look like?
- GauntletWizard 5y agoJust "company.com/pagerduty-service" as a "required" annotation (i.e. if you forget your namespace's team gets a reminder at their E-mail, which is another required annotation) Namespace onboarding is self-service by pull request: a template namespace is in the readme, and contains a number of standard annotations like ldap group and etc. The kubernetes admin team accepts and merges those requests and the bot deploys the namespace folder to the clusters. This is basically zero overhead at small groups and scales well to giant companies, you just add annotations and sometimes labels as business requirements and structure dictate.
- deleted 5y ago[deleted]
- webb 5y agoYeah, I agree. I actually think that labels are a much better fit for this reference. > Instead, Kubernetes annotations are meant for sharing information with other colleagues. For example, you may use an annotation to record the phone number of the person responsible for a pod But it can be super helpful to put owner/contact info for alerting purposes as teams scale. I also agree that having this metadata on the controller is helpful.
- dan_quixote 5y agoYup, used quite a lot for things like loadbalancer configuration (for instance): https://kubernetes-sigs.github.io/aws-load-balancer-controller/v2.2/guide/service/annotations/ https://kubernetes-sigs.github.io/aws-load-balancer-controll...
- stumarkin 5y agoWe discussed and agree, PR just merged to update this reference: https://github.com/kubecost/blog/pull/26 https://github.com/kubecost/blog/pull/26