本文介绍了如何为kube-scheduler创建配置文件以供--config参数使用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
从kubernetes 1.9开始,在kube-scheduler上已弃用--config以外的所有标志.那么如何创建配置文件呢?
As kubernetes 1.9 , all flags than --config are deprecated on kube-scheduler. So how to create config file ?
推荐答案
从小技巧开始构建并使用--write-config-to
会生成一个示例配置文件.检查它是一个Yaml文件,使用 KubeSchedulerConfig 作为架构
Building from tip and using --write-config-to
yields a sample config file. Examining it, it's a yaml file using KubeSchedulerConfig as the schema.
示例配置(未指定其他标志)
Sample config (no other flags specified):
algorithmSource:
provider: DefaultProvider
apiVersion: componentconfig/v1alpha1
clientConnection:
acceptContentTypes: ""
burst: 100
contentType: application/vnd.kubernetes.protobuf
kubeconfig: ""
qps: 50
disablePreemption: false
enableContentionProfiling: false
enableProfiling: false
failureDomains: kubernetes.io/hostname,failure-domain.beta.kubernetes.io/zone,failure-domain.beta.kubernetes.io/region
hardPodAffinitySymmetricWeight: 1
healthzBindAddress: 0.0.0.0:10251
kind: KubeSchedulerConfiguration
leaderElection:
leaderElect: true
leaseDuration: 15s
lockObjectName: kube-scheduler
lockObjectNamespace: kube-system
renewDeadline: 10s
resourceLock: endpoints
retryPeriod: 2s
metricsBindAddress: 0.0.0.0:10251
schedulerName: default-scheduler
这篇关于如何为kube-scheduler创建配置文件以供--config参数使用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!