apiVersion: v1
kind: Pod
metadata:
  annotations:
    scheduler.alpha.kubernetes.io/critical-pod: ""
  name: keepalived
  namespace: kube-system
spec:
  volumes:
  - name: keepalived-conf
    hostPath:
      path: /etc/kubernetes/manifests/keepalived/
  containers:
  - name: keepalived
    image: osixia/keepalived:2.0.20
    imagePullPolicy: IfNotPresent
    volumeMounts:
    - name: keepalived-conf
      mountPath: /container/service/keepalived/assets/keepalived.conf
      subPath: keepalived.conf
      readOnly: true
    - name: keepalived-conf
      mountPath: /etc/keepalived/check_apiserver.sh
      subPath: check_apiserver.sh
      readOnly: true
    securityContext:
      capabilities:
        add:
        - NET_ADMIN
    args: 
    - --copy-service
  hostNetwork: true
  priorityClassName: system-cluster-critical
