This is a creation in Article, where the information may have evolved or changed.
Objective
K8s cluster deployment is a commonplace problem, a lot of online information, the major gods sacrificed a variety of programs:
- Use the Package Manager provided with the Linux distribution (e.g. CentOS yum)
- Using third-party toolkits (scripts)
- Using third-party two-time development kits
This article describes a semi-manual approach to deployment of k8s discovered during the browsing of K8s source code
Source
A directory was found in the process of browsing the source code
# /opt/kubernetes-src/src/k8s.io/cluster/centosdrwxrwxr-x 4 xingpingz xingpingz 4096 12月 4 13:31 ./drwxrwxr-x 21 xingpingz xingpingz 4096 12月 4 13:31 ../-rwxrwxr-x 1 xingpingz xingpingz 4305 12月 4 11:37 build.sh*-rwxrwxr-x 1 xingpingz xingpingz 1763 12月 4 11:40 config-build.sh*-rwxrwxr-x 1 xingpingz xingpingz 4899 12月 4 13:31 config-default.sh*-rw-rw-r-- 1 xingpingz xingpingz 747 12月 4 11:37 config-test.sh-rwxrwxr-x 1 xingpingz xingpingz 2739 12月 4 11:40 deployAddons.sh*-rw-rw-r-- 1 xingpingz xingpingz 175 12月 4 11:37 .gitignoredrwxrwxr-x 3 xingpingz xingpingz 4096 12月 4 11:37 master/drwxrwxr-x 4 xingpingz xingpingz 4096 12月 4 11:37 node/-rwxrwxr-x 1 xingpingz xingpingz 12319 12月 4 11:37 util.sh*
Just to see that these shell scripts should be used to automatically download in CentOS, install K8s's
Take a look at the configuration file config-build.sh, where you can configure the version of the k8s components to download
releases_dir=${releases_dir:-/tmp/downloads}# Define Docker version to use. docker_version=${docker_version:-"1.12.1"}# Define flannel VERSION to use. flannel_version=${flannel_version:-"0.6.1"}# Define etcd VERSION to use. etcd_version=${etcd_version:-"3.0.9"}# Define k8s VERSION to use. k8s_version=${k8s_version:-"1.3.7"}docker_download_url=\ "https://get.docker.com/builds/linux/x86_64/docker-${ Docker_version}.tgz "Flannel_download_url=\" Https://github.com/coreos/flannel/releases/download/v${flannel_ Version}/flannel-v${flannel_version}-linux-amd64.tar.gz "Etcd_download_url=\" https://github.com/coreos/etcd/ Releases/download/v${etcd_version}/etcd-v${etcd_version}-linux-amd64.tar.gz "# TODO (#33726): Switch to Dl.k8s.ioK8S _client_download_url=\ "https://storage.googleapis.com/kubernetes-release/release/v${k8s_version}/ Kubernetes-client-linux-amd64.tar.gz "K8s_server_download_url=\" https://storage.googleapis.com/ Kubernetes-release/release/v${k8s_version}/kubernetes-server-linux-amd64.tar.gz "
Components downloaded from GitHub Okay, but from storage.googleapis.com pull things down estimate
Summarize
Most of the time the answer is hidden in the source code, and the whole of the search, the rest of the heart in the source or document to the answer ~