• k8s之kube-scheduler (八)


    kube-scheduler在集群中的作用

    kube-scheduler是以插件形式存在的组件,正因为以插件形式存在,所以其具有可扩展可定制的特性。kube-scheduler相当于整个集群的调度决策者,其通过预选和优选两个过程决定容器的最佳调度位置。

    kube-scheduler源码中的关键性调用链

    1 hdss7-21上部署

    vi /opt/kubernetes/server/bin/kube-scheduler.sh
    #!/bin/sh
    ./kube-scheduler 
      --leader-elect  
      --log-dir /data/logs/kubernetes/kube-scheduler 
      --master http://127.0.0.1:8080 
      --v 2
     chmod +x /opt/kubernetes/server/bin/kube-scheduler.sh
      mkdir -p /data/logs/kubernetes/kube-scheduler
      vi /etc/supervisord.d/kube-scheduler.ini
      [program:kube-scheduler-7-21]
    command=/opt/kubernetes/server/bin/kube-scheduler.sh                     ; the program (relative uses PATH, can take args)
    numprocs=1                                                               ; number of processes copies to start (def 1)
    directory=/opt/kubernetes/server/bin                                     ; directory to cwd to before exec (def no cwd)
    autostart=true                                                           ; start at supervisord start (default: true)
    autorestart=true                                                         ; retstart at unexpected quit (default: true)
    startsecs=30                                                             ; number of secs prog must stay running (def. 1)
    startretries=3                                                           ; max # of serial start failures (default 3)
    exitcodes=0,2                                                            ; 'expected' exit codes for process (default 0,2)
    stopsignal=QUIT                                                          ; signal used to kill process (default TERM)
    stopwaitsecs=10                                                          ; max num secs to wait b4 SIGKILL (default 10)
    user=root                                                                ; setuid to this UNIX account to run the program
    redirect_stderr=true                                                     ; redirect proc stderr to stdout (default false)
    stdout_logfile=/data/logs/kubernetes/kube-scheduler/scheduler.stdout.log ; stderr log path, NONE for none; default AUTO
    stdout_logfile_maxbytes=64MB                                             ; max # logfile bytes b4 rotation (default 50MB)
    stdout_logfile_backups=4                                                 ; # of stdout logfile backups (default 10)
    stdout_capture_maxbytes=1MB                                              ; number of bytes in 'capturemode' (default 0)
    stdout_events_enabled=false                                              ; emit events on stdout writes (default false)
    
    # supervisorctl update
    # supervisorctl status
    # ln -s /opt/kubernetes/server/bin/kubectl /usr/bin/kubectl
    # kubectl get cs
    
    
    同理22同步操作
    

    image.pngimage.png

    原文章已同步语雀

    https://www.yuque.com/songyifei/bkxwl0/gw8g3b

  • 相关阅读:
    第三方登陆--新浪
    YII2.0邮箱发送
    MYSQL 数据库实现远程连接
    MEMCACHE所有方法及参数详解
    把时间转成适合符合日常习惯的格式【js】
    mvc的自带json序列化的datetime在js中的解析
    如何在word中的第3+n页处插入页面并重新从1开始
    古怪的运算符=+
    【摘录】某表含有N个字段超精简模糊查询方法
    C#中快速释放内存,任务管理器可查证
  • 原文地址:https://www.cnblogs.com/sseban/p/13055575.html
Copyright © 2020-2023  润新知