• Kubernetes集群调度之Scheduler


    Kubernetes集群调度之Scheduler

    部署

    添加服务启动脚本

    [root@lab-26 ctchat]# 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
    
    [root@lab-26 ctchat]# chmod +x /opt/kubernetes/server/bin/kube-scheduler.sh
    [root@lab-26 ctchat]# mkdir -p /data/logs/kubernetes/kube-scheduler
    

    使用supervisor服务管理

    [program:kube-scheduler-152-106]
    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)
    killasgroup=true
    stopasgroup=true
    
    [root@lab-26 ctchat]# supervisorctl update
    kube-scheduler-152-106: added process group
    [root@lab-26 ctchat]# ln -s /opt/kubernetes/server/bin/kubectl /usr/bin/kubectl
    

    至此该服务部署完毕。

    加油,你们是最棒的!
  • 相关阅读:
    MIB Browser使用方法
    RestTemplate调用https接口跳过证书验证
    Looper&Handler
    Thread类以及常见得同步类
    Android 关键类(RefBase,sp, wp)
    JNI
    binder
    struct enum union区别
    Q_PROPERTY
    linux 命令
  • 原文地址:https://www.cnblogs.com/Wshile/p/12851467.html
Copyright © 2020-2023  润新知