<p>I am trying to create a high availability cluster using the kubeadm tool. And I am trying to install the tools that specified in the pre-requistics of kubeadm installation. When I am running <code>sudo apt-get install -y kubelet kubeadm kubectl</code> , I am getting the error like the following,</p>

<pre><code>Building dependency tree
Reading state information... Done
E: Unable to locate package kubelet
E: Unable to locate package kubeadm
E: Unable to locate package kubectl 
</code></pre>

<p><strong>My Attempt</strong></p>

<p>I am following the following official documentation for preparing the nodes from kubernetes.io. I am refering the following link for that,</p>

<p><a href="https://kubernetes.io/docs/setup/production-environment/tools/kubeadm/install-kubeadm/#before-you-begin" rel="noreferrer">https://kubernetes.io/docs/setup/production-environment/tools/kubeadm/install-kubeadm/#before-you-begin</a></p>

<p>Ans when I am continuing with following commands as described in the official documentation,</p>

<pre><code>sudo apt-get update &amp;&amp; sudo apt-get install -y apt-transport-https curl
curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add -
cat &lt;&lt;EOF | sudo tee /etc/apt/sources.list.d/kubernetes.list deb https://apt.kubernetes.io/ kubernetes-xenial main EOF
sudo apt-get update
sudo apt-get install -y kubelet kubeadm kubectl
sudo apt-mark hold kubelet kubeadm kubectl
</code></pre>

<p><strong>Updates</strong></p>

<p>When I tried the answer from Mr.Tummala, I am getting the error like the following,</p>

<pre><code>W: Failed to fetch https://apt.kubernetes.io/dists/kubernetes-xenial/InRelease  Could not resolve host: apt.kubernetes.io
W: Some index files failed to download. They have been ignored, or old ones used instead.
</code></pre>

<p>But result like unable to locate the package.</p>

<p>See if the below steps are doing the trick for you.</p>

<pre><code>sudo apt-get update &amp;&amp; sudo apt-get install -y apt-transport-https curl
echo "deb https://apt.kubernetes.io/ kubernetes-xenial main" | sudo tee /etc/apt/sources.list.d/kubernetes.list
sudo apt-get update
sudo apt-get install -y kubelet kubeadm kubectl
sudo apt-mark hold kubelet kubeadm kubectl
</code></pre>
