Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 27 additions & 1 deletion docs/xks/developer-guide/best-practices.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,30 @@ This page aims to collect best practices and common mistakes that can be made wh

Here are some good resources to also read on top of this page.

* [https://srcco.de/posts/web-service-on-kubernetes-production-checklist-2019.html](https://srcco.de/posts/web-service-on-kubernetes-production-checklist-2019.html)
- [https://srcco.de/posts/web-service-on-kubernetes-production-checklist-2019.html](https://srcco.de/posts/web-service-on-kubernetes-production-checklist-2019.html)

## Labels

There are multiple reasons to label your workloads.

- Grouping
- Searchability
- Billing

The Kubernetes communnity have a number of default labels that they recommend to put on all your workloads.
There are also a number of extra labels that might be useful for you, remember that these labels are only
examples and you will have to try around to find which labels fits best for you.

### Kubernetes standard Labels

```.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: deployment
labels:
app.kubernetes.io/name: user-api
app.kubernetes.io/version: "42"
app.kubernetes.io/component: api
app.kubernetes.io/part-of: payment-gateway
```