Starting with KET v1.6, the tool installs the "official" packages from Kubernetes and Docker. For any cluster built with a previous version of KET, the packages will be upgraded to use the new repos during the regular upgrade process and should have no impact on the users.
By default, Kismatic will install the required repos onto machines and use them to install the packages. This may not be acceptable, for example, if you want to adopt a "golden image" prior to rolling out a many-node cluster, if you need to install a cluster in a lab where most machines are disconnected from the internet, or if you simply want to save bandwidth. If this is your use case, please view the instructions below.
sudo bash -c 'cat <<EOF > /etc/yum.repos.d/docker.repo
[docker]
name=Docker
baseurl=https://download.docker.com/linux/centos/7/x86_64/stable/
enabled=1
gpgcheck=1
repo_gpgcheck=1
gpgkey=https://download.docker.com/linux/centos/gpg
EOF'
sudo bash -c 'cat <<EOF > /etc/yum.repos.d/kubernetes.repo
[kubernetes]
name=Kubernetes
baseurl=https://packages.cloud.google.com/yum/repos/kubernetes-el7-x86_64
enabled=1
gpgcheck=1
repo_gpgcheck=1
gpgkey=https://packages.cloud.google.com/yum/doc/yum-key.gpg
https://packages.cloud.google.com/yum/doc/rpm-package-key.gpg
EOF'
Component | Install Command |
---|---|
Etcd Node | sudo yum -y install --setopt=obsoletes=0 docker-ce-17.03.2.ce-1.el7.centos |
Kubernetes Node | sudo yum -y install --setopt=obsoletes=0 docker-ce-17.03.2.ce-1.el7.centos && yum -y install nfs-utils kubelet-1.10.3-0 kubectl-1.10.3-0 |
- Install prerequisites
sudo apt-get update && sudo apt-get install -y apt-transport-https curl
- Add the Docker public key to apt
curl -s https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
- Add the Docker repo
sudo bash -c 'cat <<EOF >/etc/apt/sources.list.d/docker.list
deb [arch=amd64] https://download.docker.com/linux/ubuntu xenial stable
EOF'
- Add the Kubernetes public key to apt
curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add -
- Add the Kubernetes repo
sudo bash -c 'cat <<EOF >/etc/apt/sources.list.d/kubernetes.list
deb https://packages.cloud.google.com/apt/ kubernetes-xenial main
EOF'
sudo apt-get update
Component | Install Command |
---|---|
Etcd Node | sudo apt-get install -y docker-ce=17.03.2~ce-0~ubuntu-xenial |
Kubernetes Node | sudo apt-get install -y docker-ce=17.03.2~ce-0~ubuntu-xenial nfs-common kubelet=1.10.3-00 kubectl=1.10.3-00 |
When the Ubuntu kubelet package is installed the service will be started and will bind to ports. This will cause some preflight port checks to fail.
sudo systemctl stop kubelet
If you maintain a package repository, you should not perform step 1 in the instructions above. Instead, you should point machines to your own package repository and keep it in sync with Docker and Kubernetes.
Each package will also have many transitive dependencies. To be able to install nodes fully disconnected from the internet, you will need to synchronize your repo with these packages' repos as well.
Dependencies and their versions will change over time and as such they are not listed here. Instead, they can be derived from any machine that is integrated with our repos using the commands linked below.
One way to ensure you've correctly synchronized your repo is to install a test cluster.
- Provision 1 node of each role
- Install the packages
- Run
kismatic plan
to generate a new Plan file - Update the Plan file to identify your nodes and using the configuration
disable_package_installation=true
. - Run
kismatic validate
- During validation, the Kismatic inspector will check your packages to be sure they installed correctly and will fail if any of them are missing.
Changes to dependencies should be called out in the notes that accompany a release.
Listing dependencies of a package: yum deplist $PACKAGE
Listing dependencies of a package: apt-cache depends $PACKAGE