apt-get install -y kubelet kubeadm kubectl giving error

0 votes

I am trying to install Kubernetes and the following command is giving me an error

root@ip-172-31-18-168:~# apt-get install -y kubelet kubeadm kubectl
Reading package lists... Done
Building dependency tree 
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
kubeadm : Depends: kubernetes-cni (= 0.6.0) but 0.6.0-02 is to be installed
kubelet : Depends: kubernetes-cni (= 0.6.0) but 0.6.0-02 is to be installed
E: Unable to correct problems, you have held broken packages.
Dec 19, 2018 in Kubernetes by Ali
• 11,360 points
10,697 views

2 answers to this question.

0 votes

Make sure you've followed these steps accurarely, you seem to have missed on of these commands:

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
5. apt-get install -y kubelet kubeadm kubectl
6. apt-mark hold kubelet kubeadm kubectl
answered Dec 19, 2018 by Charlie
0 votes
apt-get install -y kubelet kubeadm kubectl kubernetes-cni
answered Sep 11, 2020 by anonymous

Related Questions In Kubernetes

+1 vote
5 answers
+1 vote
1 answer
0 votes
1 answer

permissions related to AWS ECR

if you add allowContainerRegistry: true, kops will add those permissions ...READ MORE

answered Oct 9, 2018 in Kubernetes by Kalgi
• 52,350 points
1,402 views
+1 vote
1 answer
0 votes
3 answers

Error while joining cluster with node

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

answered Jan 17, 2019 in Others by anonymous
15,488 views
0 votes
1 answer

Kops validate cluster giving an error saying no such host

One of the possible reasons could be using ...READ MORE

answered Jan 8, 2019 in Kubernetes by Manali
2,666 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP