Skip to content

Latest commit

 

History

History
51 lines (40 loc) · 835 Bytes

9-dependencies.md

File metadata and controls

51 lines (40 loc) · 835 Bytes

Dependencies

Labels and Selectors

  • Attach metadata to Kubernetes objects
  • Map organizational structures onto system objects in a loosely coupled fashion
  • Selectors identifies a set of objects by labels (AND concatenated by default)

Example

service.yaml

apiVersion: v1
kind: Service
spec:
  selector:
    app: todo
    tier: frontend
spec:
  ...

deployment.yaml

apiVersion: extensions/v1beta1
kind: Deployment
metadata:
  name: todo-app
  labels:
    app: todo
    tier: frontend
spec: ...

Annotations

  • Add metadata as additional informations
apiVersion: v1
kind: Service
metadata:
  annotations:
    external-dns.alpha.kubernetes.io/hostname: todo-app.workshops.mikebild.com.
spec: ...