external-dns/docs/tutorials/security-context.md
Sean Malloy b349103de7 Update Documentation with Updated Registry Location
The k8s external-dns project now uses the official Kubernetes projects
container registry at k8s.gcr.io. Update all references to use the new
registry.
2020-08-21 16:28:57 -05:00

720 B

Running ExternalDNS with limited privileges

You can run ExternalDNS with reduced privileges since v0.5.6 using the following SecurityContext.

apiVersion: apps/v1
kind: Deployment
metadata:
  name: external-dns
spec:
  strategy:
    type: Recreate
  selector:
    matchLabels:
      app: external-dns
  template:
    metadata:
      labels:
        app: external-dns
    spec:
      containers:
      - name: external-dns
        image: k8s.gcr.io/external-dns/external-dns:v0.7.3
        args:
        - ... # your arguments here
        securityContext:
          runAsNonRoot: true
          runAsUser: 65534
          readOnlyRootFilesystem: true
          capabilities:
            drop: ["ALL"]