apiVersion: v1
kind: ServiceAccount
metadata:
name: custom-scheduler
namespace: kube-system (1)
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: custom-scheduler-as-kube-scheduler
subjects:
- kind: ServiceAccount
name: custom-scheduler
namespace: kube-system (1)
roleRef:
kind: ClusterRole
name: system:kube-scheduler
apiGroup: rbac.authorization.k8s.io
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: custom-scheduler-as-volume-scheduler
subjects:
- kind: ServiceAccount
name: custom-scheduler
namespace: kube-system (1)
roleRef:
kind: ClusterRole
name: system:volume-scheduler
apiGroup: rbac.authorization.k8s.io
---
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
component: scheduler
tier: control-plane
name: custom-scheduler
namespace: kube-system (1)
spec:
selector:
matchLabels:
component: scheduler
tier: control-plane
replicas: 1
template:
metadata:
labels:
component: scheduler
tier: control-plane
version: second
spec:
serviceAccountName: custom-scheduler
containers:
- command:
- /usr/local/bin/kube-scheduler
- --config=/etc/config/scheduler-config.yaml (2)
image: "<namespace>/<image_name>:<tag>" (3)
livenessProbe:
httpGet:
path: /healthz
port: 10259
scheme: HTTPS
initialDelaySeconds: 15
name: kube-second-scheduler
readinessProbe:
httpGet:
path: /healthz
port: 10259
scheme: HTTPS
resources:
requests:
cpu: '0.1'
securityContext:
privileged: false
volumeMounts:
- name: config-volume
mountPath: /etc/config
hostNetwork: false
hostPID: false
volumes:
- name: config-volume
configmap:
name: scheduler-config