1
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

yumで任意のバージョンのkubernetesをインストールしたいとき

Last updated at Posted at 2019-06-04

#TL;DL
CentOSにKubernetesをインストールするときに、yum install kubelet kubeadm kubectlすると最新が入ってしまうと嫌な人向けにバージョン指定するやり方をメモしておくものです

#前提

/etc/os-release
NAME="CentOS Linux"                        
VERSION="7 (Core)"                         
ID="centos"                                
ID_LIKE="rhel fedora"                      
VERSION_ID="7"                             
PRETTY_NAME="CentOS Linux 7 (Core)"        

#レポジトリ作成

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

#指定方法

yum install <component>-<version number(X.XX.X-X)>.x86_64

#実行例
1.13.5を指定する場合

yum install -y kubelet-1.13.5-0.x86_64 kubeadm-1.13.5-0.x86_64 kubectl-1.13.5-0.x86_64
1
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?