apiVersion: v1
kind: Service
metadata:
  namespace: kube-system
  name: kube-scheduler
  labels:
    k8s-app: kube-scheduler
spec:
  selector:
    component: kube-scheduler
  ports:
  - name: http-metrics
    port: 10251
    targetPort: 10251


#修改 kube-scheduler 配置，/etc/kubernetes/manifests/kube-scheduler.yaml，
#--bind-address=0.0.0.0  #改为0.0.0.0
#kubectl get cs 集群组件状态，注销--port=0