#!/bin/bash
VIP="240.8.8.8"
master1="10.1.1.20"
master2="10.1.1.21"
master3="10.1.1.22"
mkdir -p /etc/kubernetes/manifests
cat << EOF | tee /etc/kubernetes/manifests/lvscare.yaml
apiVersion: v1
kind: Pod
metadata:
creationTimestamp: null
labels:
component: lvscare
tier: control-plane
name: lvscare
namespace: kube-system
spec:
containers:
- args:
- care
- --vs
- ${VIP}:6443
- --health-path
- /healthz
- --health-schem
- https
- --rs
- ${master1}:6443
- --rs
- ${master2}:6443
- --rs
- ${master3}:6443
command:
- /usr/bin/lvscare
image: lvscare:v4.0.0-amd64
imagePullPolicy: IfNotPresent
name: lvscare
resources: {}
securityContext:
privileged: true
volumeMounts:
- mountPath: /lib/modules
name: lib-modules
readOnly: true
hostNetwork: true
priorityClassName: system-cluster-critical
volumes:
- hostPath:
path: /lib/modules
type: ""
name: lib-modules
status: {}
EOF
lvscare