external-dns/docs/tutorials/security-context.md
Raffaele Di Fazio 00f919d20f all the v0.13.4 updates
Signed-off-by: Raffaele Di Fazio <difazio.raffaele@gmail.com>
2023-03-27 23:07:49 +02:00

726 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: registry.k8s.io/external-dns/external-dns:v0.13.4
        args:
        - ... # your arguments here
        securityContext:
          runAsNonRoot: true
          runAsUser: 65534
          readOnlyRootFilesystem: true
          capabilities:
            drop: ["ALL"]