配置和启动Kubernetes服务

  • 安装etcd服务
  1. 下载安装包
    wget https://github.com/coreos/etcd/releases/download/v3.1.3/etcd-v3.1.3-linux-amd64.tar.gz

    解压后将可执行文件复制到/urs/bin目录

    tar xzvf etcd-v3.1.3-linux-amd64.tar.gz 
    
    cd etcd-v3.1.3-linux-amd64 && cp etcd* /usr/bin/

    配置开机启动etcd.service

    vi /usr/lib/systemd/system/etcd.service
    [Unit]
    Description=Etcd Server
    After=network.target
    
    [Service]
    Type=simple
    WorkingDirectory=/var/lib/etcd/
    EnvironmentFile=-/etc/etcd/etcd.conf
    # set GOMAXPROCS to number of processors
    ExecStart=/usr/bin/etcd
    
    
    [Install]
    WantedBy=multi-user.target
  2. 创建工作目录
    mkdir /var/lib/etcd

     

  3. 启动并加入开机列表
    systemctl  daemon-reload
    systemctl enable etcd.service
    systemctl  start etcd.service

     

  • kube-apiserver服务
posted @ 2017-03-12 15:50  yuchen16  阅读(4030)  评论(0编辑  收藏  举报