Download the latest version:
Https://github.com/kubernetes/kubernetes/releases
Download kubernetes.tar.gz
After decompression to the cluster directory
Executive get-kube-binaries.sh
Execute directory to control, this script will automatically download the client and server-related files, will be automatically placed in the Kubernetes directory
The corresponding file can then be found under the corresponding bin
Kube-apiserver kube-controller-manager kube-scheduler kubelet kubectl kube-proxy
Repeat the above work to each cluster node
Need to install the necessary components in the cluster node
Docker ETCD Flanneld (installation mode optional)
To the master node needs to be executed
Kube-apiserver Kube-controller-manager Kube-scheduler
Work node needs to run
Kubelet Kube-proxy
The subsequent work is similar to the Yum installation steps
Configuration related files, etc.
Boot mode can be started by service startup mode
Writing Service files
/usr/lib/systemd/system/kube-apiserver.service
[Unit]
Description=kubernetes API Server
Documentation=https://github.com/googlecloudplatform/kubernetes
After=network.target
After=etcd.service
[Service]
Environmentfile=-/etc/kubernetes/config
Environmentfile=-/etc/kubernetes/apiserver
User=kube
Execstart=/usr/bin/kube-apiserver \
$KUBE _logtostderr \
$KUBE _log_level \
$KUBE _etcd_servers \
$KUBE _api_address \
$KUBE _api_port \
$KUBELET _port \
$KUBE _allow_priv \
$KUBE _service_addresses \
$KUBE _admission_control \
$KUBE _api_args
Restart=on-failure
Type=notify
limitnofile=65536
[Install]
Wantedby=multi-user.target
/usr/lib/systemd/system/kube-controller-manager.service
[Unit]
Description=kubernetes Controller Manager
Documentation=https://github.com/googlecloudplatform/kubernetes
[Service]
Environmentfile=-/etc/kubernetes/config
Environmentfile=-/etc/kubernetes/controller-manager
User=kube
Execstart=/usr/bin/kube-controller-manager \
$KUBE _logtostderr \
$KUBE _log_level \
$KUBE _master \
$KUBE _controller_manager_args
Restart=on-failure
limitnofile=65536
[Install]
Wantedby=multi-user.target
/usr/lib/systemd/system/kube-scheduler.service
[Unit]
Description=kubernetes Scheduler Plugin
Documentation=https://github.com/googlecloudplatform/kubernetes
[Service]
Environmentfile=-/etc/kubernetes/config
Environmentfile=-/etc/kubernetes/scheduler
User=kube
Execstart=/usr/bin/kube-scheduler \
$KUBE _logtostderr \
$KUBE _log_level \
$KUBE _master \
$KUBE _scheduler_args
Restart=on-failure
limitnofile=65536
[Install]
Wantedby=multi-user.target
/usr/lib/systemd/system/kubelet.service
[Unit]
Description=kubernetes Kubelet Server
Documentation=https://github.com/googlecloudplatform/kubernetes
After=docker.service
Requires=docker.service
[Service]
Workingdirectory=/var/lib/kubelet
Environmentfile=-/etc/kubernetes/config
Environmentfile=-/etc/kubernetes/kubelet
Execstart=/usr/bin/kubelet \
$KUBE _logtostderr \
$KUBE _log_level \
$KUBELET _api_server \
$KUBELET _address \
$KUBELET _port \
$KUBELET _hostname \
$KUBE _allow_priv \
$KUBELET _pod_infra_container \
$KUBELET _args
Restart=on-failure
[Install]
Wantedby=multi-user.target
/usr/lib/systemd/system/kube-proxy.service
[Unit]
Description=kubernetes Kube-proxy Server
Documentation=https://github.com/googlecloudplatform/kubernetes
After=network.target
[Service]
Environmentfile=-/etc/kubernetes/config
Environmentfile=-/etc/kubernetes/proxy
Execstart=/usr/bin/kube-proxy \
$KUBE _logtostderr \
$KUBE _log_level \
$KUBE _master \
$KUBE _proxy_args
Restart=on-failure
limitnofile=65536
[Install]
Wantedby=multi-user.target
Self-tuning of directories in Files
can refer to
Https://github.com/kubernetes/kubernetes/tree/master/cluster/centos
Some of the shells below
The official documentation is not very detailed at the moment, and the version is updated quickly.
Install kubernetes without Yum