"Unable to locate package" error while installing kubelet, kubeadm, kubectl

+1 vote

I'm trying to create a kubernetes cluster, and when i run the following command, i get an error

root@ip-172-31-36-181:~# apt-get install -y kubelet kubeadm kubectl
Reading package lists... Done
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
Sep 19, 2018 in Kubernetes by Nilesh
• 6,900 points
1,357 views

5 answers to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
+2 votes
Best answer

Work around 1 :  log in as root user sudo su –

-curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add - apt-get update

Apt-get install –y

Workaround 2:

Edit /etc/apt/sources.list.d/kubernetes.list or /etc/apt/sources.list ( depends on ubuntu version)

add 

deb http://apt.kubernetes.io/ kubernetes-xenial main   at the end of the list of repositories 
then run below commands, it works!..
apt-get update
apt-get install -y kubelet kubeadm kubectl
answered Oct 25, 2018 by Lakshmi Narayana ( L N )

selected May 6 by Kalgi
I had the same error and this solved it, thanks a lot @Lakshmi Narayana... but I still don't understand, why I ended up with this error in the first place?
0 votes
Execute the following commands one by one:

1) apt-get update && apt-get install -y apt-transport-https curl

2) # curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add -

3) # cat <<EOF >/etc/apt/sources.list.d/kubernetes.list

deb http://apt.kubernetes.io/ kubernetes-xenial main

EOF

4) # apt-get update
answered Sep 19, 2018 by Kalgi
• 35,800 points
+1 vote

Most people get this error because they miss out on adding a key for the repo.

Add key for new repository using the following command:

curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add -
answered May 6 by Kylie
+1 vote

For 16.04 add a repository using the following commands and you should be good to go :)

sudo vim /etc/apt/sources.list.d/kubernetes.list
deb http://apt.kubernetes.io/ kubernetes-xenial main
answered May 6 by Anand
+1 vote
Docker only works on 64-bit platform so it's necessary you install Kubernetes on 64 Bits.
answered May 6 by Nadia
Mine was a 32 bit machine. Tried installing on 64 bit. Got installed without any issue. Thanks

Related Questions In Kubernetes

0 votes
1 answer

" apt-get install -y kubelet kubeadm kubectl" giving error

Make sure you've followed these steps accurarely, ...READ MORE

answered Dec 18, 2018 in Kubernetes by Charlie
275 views
0 votes
2 answers

Error while installing MiniKube

Check if it's properly enabled for the ...READ MORE

answered Aug 30, 2018 in Kubernetes by Kalgi
• 35,800 points
222 views
0 votes
1 answer

Unable to get cgroup stats for docker and kubelet services

Try and start kubelet with the following ...READ MORE

answered Sep 3, 2018 in Kubernetes by DareDev
• 6,560 points
84 views
0 votes
4 answers

Error saying "Unable to connect to the server: x509: certificate signed by unknown authority"

Append kubectl get all command with --insecure-skip-tls-verify=true This did ...READ MORE

answered Apr 23 in Kubernetes by Joshua
1,875 views
0 votes
2 answers

Error while installing curl on ubuntu

This might help https://www.edureka.co/community/18638/resource-tempo ...READ MORE

answered Nov 23, 2018 in Kubernetes by Harsha
31 views
+1 vote
1 answer
0 votes
1 answer
0 votes
3 answers

Error while joining cluster with node

Hi Kalgi after following above steps it ...READ MORE

answered Jan 17 in Others by anonymous
484 views
+3 votes
1 answer

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.