Kubernetes Best Practices
约 1 分钟阅读
- 9 Best Practices and Examples for Working with Kubernetes Labels
- Labels and Selectors in Kubernetes on AWS
- Kubernetes Best Practices (GitHub)GitHubdiegolnasc/kubernetes-best-practices9 Best Practices and Examples for Working with Kubernetes Labels · Labels and Selectors in Kubernetes on AWS · Kubernetes Best Practices (GitHub)笔记:Kubernetes Best Practices
- Kubernetes Production Best Practices (Medium)
Labeling Examples
metadata:
labels:
application: my-app
version: 'v31'
release: 'r42'
stage: productionkind: Service
apiVersion: v1
metadata:
name: my-app
spec:
selector:
application: my-app
stage: production
ports:
- port: 80
targetPort: 8080
protocol: TCPRecommended Labels
Standard labels recommended by Kubernetes:
app.kubernetes.io/nameapp.kubernetes.io/instanceapp.kubernetes.io/versionapp.kubernetes.io/componentapp.kubernetes.io/part-ofapp.kubernetes.io/managed-by
apiVersion: v1
kind: Pod
metadata:
labels:
app.kubernetes.io/name: my-pod
app.kubernetes.io/instance: Auth-1a
app.kubernetes.io/version: '2.0.1'
app.kubernetes.io/component: Auth
app.kubernetes.io/part-of: my-app
app.kubernetes.io/managed-by: helm关联信息
反向链接、本文链接的其他页面和外部资料。
参考资料
GitHub1 条
- diegolnasc/kubernetes-best-practicesgithub.com/diegolnasc/kubernetes-best-practices
其他外链3 条
- kubernetes-on-aws.readthedocs.io/en/latest/user-guide/labels.htmlkubernetes-on-aws.readthedocs.io/en/latest/user-guide/labels.html
- medium.com/@diego.lnasc/kubernetes-production-best-pratices-41ee2dcd1eamedium.com/@diego.lnasc/kubernetes-production-best-pratices-41ee2dcd1ea
- www.replex.io/blog/9-best-practices-and-examples-for-working-with-kubernetes-labelswww.replex.io/blog/9-best-practices-and-examples-for-working-with-kubernetes-labels