apiVersion: v1 kind: ServiceAccount metadata: name: haproxy-sa namespace: kube-system --- apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: name: haproxy-ingress-reader rules: - apiGroups: [""] resources: ["endpoints", "services", "namespaces"] verbs: ["get", "list", "watch"] - apiGroups: ["networking.k8s.io"] resources: ["ingresses"] verbs: ["get", "list", "watch"] --- apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding metadata: name: haproxy-ingress-reader-binding roleRef: apiGroup: rbac.authorization.k8s.io kind: ClusterRole name: haproxy-ingress-reader subjects: - kind: ServiceAccount name: haproxy-sa namespace: kube-system