Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with cluster installation #17

Closed
lovemasta41 opened this issue May 15, 2023 · 5 comments
Closed

Issue with cluster installation #17

lovemasta41 opened this issue May 15, 2023 · 5 comments

Comments

@lovemasta41
Copy link

lovemasta41 commented May 15, 2023

Hi Sander,

I was highly motivated to learn k8s from your course. I have 3 Ubuntu 22.04 instances running in AWS EC2 out of which on one of them I followed the steps mentioned in your course to set as control plane.

I used both the .sh files to install container runtime and Kube tools. After that I used sudo kubeadm init as mentioned in the video. Then performed steps to get cluster context. After that I simply did kubectl create -f cka/calico.yaml but my calico container is in crashloopbackoff state.

can you suggest if there are any changes I need to know to make it work ?

@deepakjd2004
Copy link

I am also facing this issue.. Error is `2023-05-17T03:01:33.463004756Z stderr F 2023-05-17 03:01:33.462 [ERROR][1] cni-installer/ : Unable to create token for CNI kubeconfig error=serviceaccounts "calico-cni-plugin" is forbidden: User "system:serviceaccount:kube-system:calico-node" cannot create resource "serviceaccounts/token" in API group "" in the namespace "kube-system"

2023-05-17T03:01:33.463036966Z stderr F 2023-05-17 03:01:33.462 [FATAL][1] cni-installer/ : Unable to create token for CNI kubeconfig error=serviceaccounts "calico-cni-plugin" is forbidden: User "system:serviceaccount:kube-system:calico-node" cannot create resource "serviceaccounts/token" in API group "" in the namespace "kube-system"`

@lovemasta41
Copy link
Author

My issue has been resolved by using pod network cidr while initialising and updated same cidr in custom-resources.yml while adding network add-on. Now I’m able to join the nodes as well just make sure nodes are able to reach each other over network on 6443 port.

@mihabez
Copy link

mihabez commented Jun 9, 2023

Hi @lovemasta41 can you please share the solution? I have the same issue as you. Running Ubuntu 22.04 LTS on Virtualbox. Same issue on older Ubuntu 20.04 LTS

image

@lovemasta41
Copy link
Author

@mihabez : follow below steps :-

  1. curl https://raw.githubusercontent.com/projectcalico/calico/v3.25.1/manifests/custom-resources.yaml -o custom-resources.yaml - ON CONTROL NODE
  2. In downloaded custom-resources.yaml , replace cidr: 192.168.0.0/16 with cidr: 10.10.0.0/16 or something of your choice.
  3. kubectl create -f custom-resources.yaml

@starlocke
Copy link

The README.md file was updated with this helpful note just 3 days ago:

JUNE 2023 NOTE: The Calico network plugin has been changing a lot lately. I recommend using the following command to install it:

kubectl apply -f https://raw.githubusercontent.com/projectcalico/calico/v3.26.0/manifests/calico.yaml

The videos aren't likely to have been updated yet as of this writing.

In summary:

  1. Video will instruct:
    • sudo kubeadm init + (the 3 extra commands to set up kubectl authentication)
  2. Instead of doing what the video suggests for installing Calico, do the new advice from the README:
    • kubectl apply -f https://raw.githubusercontent.com/projectcalico/calico/v3.26.0/manifests/calico.yaml
  3. With Calico thus installed, the, coredns replicas will follow, going through their "ContainerCreating" and eventually hit their "Running" states.
    • kubectl get all -A was helpful for me to watch the life stages changing and becoming ready.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants