<p>I installed kubernetes using these commands on centos7 </p>

<pre><code>cat &lt;&lt;EOF &gt; /etc/yum.repos.d/kubernetes.repo
[kubernetes]
name=Kubernetes
baseurl=https://packages.cloud.google.com/yum/repos/kubernetes-el7-$basearch
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
setenforce 0
yum install -y kubelet kubeadm kubectl
</code></pre>

<p>This will install the latest version, so i'm looking for a method to install a specific version. for example 1.8.1</p>

<p>Thank you</p>

<p>To install a specific version of the package it is enough to define it during the <code>yum install</code> command:</p>

<pre><code>yum install -y kubelet-&lt;version&gt; kubectl-&lt;version&gt; kubeadm-&lt;version&gt;
</code></pre>

<p>But for your particular case, when you want to install <code>kubernetes</code> version <code>1.8.1</code>, <code>kubernetes-cni</code> package should be <code>0.5.1</code> version to satisfy dependency requirements:</p>

<pre><code>--&gt; Finished Dependency Resolution
Error: Package: kubelet-1.8.1-1.x86_64 (kubernetes)
           Requires: kubernetes-cni = 0.5.1
           Available: kubernetes-cni-0.3.0.1-0.07a8a2.x86_64 (kubernetes)
               kubernetes-cni = 0.3.0.1-0.07a8a2
           Available: kubernetes-cni-0.5.1-0.x86_64 (kubernetes)
               kubernetes-cni = 0.5.1-0
           Available: kubernetes-cni-0.5.1-1.x86_64 (kubernetes)
               kubernetes-cni = 0.5.1-1
           Installing: kubernetes-cni-0.6.0-0.x86_64 (kubernetes)
               kubernetes-cni = 0.6.0-0
</code></pre>

<p>So, the final command is:</p>

<pre><code>yum install -y kubelet-1.8.1 kubectl-1.8.1 kubeadm-1.8.1 kubernetes-cni-0.5.1
</code></pre>
