如何为-config参数使用的kube-scheduler创建配置文件

时间:2017-12-25 07:02:05

标签: kubernetes

作为kubernetes 1.9,除了--config之外的所有标志都在kube-scheduler上弃用。那么如何创建配置文件?

1 个答案:

答案 0 :(得分:3)

从提示构建并使用--write-config-to生成示例配置文件。检查它,它是一个使用KubeSchedulerConfig作为模式的yaml文件。

示例配置(未指定其他标志):

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