" 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 18, 2018 in Kubernetes by Ali
• 10,400 points

1 answer 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
4. apt-get update
5. apt-get install -y kubelet kubeadm kubectl
6. apt-mark hold kubelet kubeadm kubectl
answered Dec 18, 2018 by Charlie

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
• 40,440 points
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
0 votes
1 answer