보뇨 다이어리

Kubernetes(쿠버네티스) 특정버전 설치하기 본문

컴퓨터 관련/서버 정보

Kubernetes(쿠버네티스) 특정버전 설치하기

보뇨 2019. 2. 21. 10:16
반응형

뭐 이어서 쓰자면 쿠버네티스도 특정 버전을 설치해야만했다

그래서 뭐 어떻게하지 보니 역시나 stackoverflow 분들이 아주 잘써주셨다 아래와 같이 진행하면된다


To install specific version of the package it is enough to define it during the apt-get install command:

apt-get install -qy kubeadm=<version>

But in the current case kubectl and kubelet packages are installed by dependencies when we install kubeadm, so all these three packages should be installed with a specific version:

$ curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add - && \
  echo "deb http://apt.kubernetes.io/ kubernetes-xenial main" | sudo tee /etc/apt/sources.list.d/kubernetes.list && \
  sudo apt-get update -q && \
  sudo apt-get install -qy kubelet=<version> kubectl=<version> kubeadm=<version>

where available <version> is:

curl -s https://packages.cloud.google.com/apt/dists/kubernetes-xenial/main/binary-amd64/Packages | grep Version | awk '{print $2}'

For your particular case it is:

$ curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add - && \
  echo "deb http://apt.kubernetes.io/ kubernetes-xenial main" | sudo tee /etc/apt/sources.list.d/kubernetes.list && \
  sudo apt-get update -q && \
  sudo apt-get install -qy kubelet=1.9.6-00 kubectl=1.9.6-00 kubeadm=1.9.6-00


출처

https://stackoverflow.com/questions/49721708/how-to-install-specific-version-of-kubernetes

반응형