6

I have installed my kubernetes cluster(1master, 3worker)in the digital ocean.
The problem is I installed both flannel and calico in this cluster.
I want to remove the calico completely from my cluster or is it ok to have multiple CNI?

AATHITH RAJENDRAN
  • 4,689
  • 8
  • 34
  • 58

3 Answers3

9

Use following two commands to remove calico from your node:

kubectl delete -f https://docs.projectcalico.org/v3.3/getting-started/kubernetes/installation/hosted/rbac-kdd.yaml
kubectl delete -f https://docs.projectcalico.org/v3.3/getting-started/kubernetes/installation/hosted/kubernetes-datastore/calico-networking/1.7/calico.yaml
Prafull Ladha
  • 12,341
  • 2
  • 37
  • 58
  • How did you add calico to the cluster or it came by default with cluster deployment? – Prafull Ladha Dec 04 '18 at 10:46
  • do we need to replace v3.3 in the URL with our installed version? – shreyas Jul 10 '20 at 09:38
  • 2
    @PrafullLadha-: I tried your Kubectl delete commands but I am not able to delete calicoctl . The command and calico pods are still up. My calico version is: Client Version: v3.19.1 Git commit: 6fc0db96 – solveit Jul 26 '21 at 06:55
-1

You should add these

https://docs.projectcalico.org/v3.3/getting-started/kubernetes/installation/hosted/rbac-kdd.yaml

and

https://docs.projectcalico.org/v3.3/getting-started/kubernetes/installation/hosted/kubernetes-datastore/calico-networking/1.7/calico.yaml

to your ansible playbook file state as "absent" then when you run ansible playbook file i.e as below.

- name: Delete Calico (rbac-kdd.yaml) from cluster
  kubernetes:
    api_endpoint: 123.45.67.89
    insecure: true
    file_reference: /path/to/rbac-kdd.yaml
    state: absent

- name: Delete Calico (calico.yaml) from cluster
  kubernetes:
    api_endpoint: 123.45.67.89
    insecure: true
    file_reference: /path/to/calico.yaml
    state: absent

Please check your ansible playbook file for cluster installation and change/modify values according your needs.

For more details kubernetes with ansible you can see this: https://docs.ansible.com/ansible/2.5/modules/kubernetes_module.html

I hope it will be helpful for you

clxoid
  • 2,577
  • 12
  • 21
  • 5
    Did I miss where the question indicates they use Ansible? – CashIsClay Aug 28 '20 at 00:48
  • @CashIsClay that's right, you miss the fact that this question is edited in Dec 19 2019, and my answer was Dec 4 2018. – clxoid Aug 29 '20 at 12:50
  • 3
    @coolinuxoid the revision of the edit only shows that `or is it ok to have multiple CNI?` was added.. no mention of Ansible – Coffeeholic Sep 03 '20 at 14:18
  • @Coffeeholic not sure what you are trying to achieve but I am sure that question was with Ansible related. I remember this very well – clxoid Sep 08 '20 at 12:38
-2

PLease change the security group, If its AWS If its s VM, Expose the port

  • As it’s currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Oct 03 '22 at 12:29
  • This does not provide an answer to the question. Once you have sufficient [reputation](https://stackoverflow.com/help/whats-reputation) you will be able to [comment on any post](https://stackoverflow.com/help/privileges/comment); instead, [provide answers that don't require clarification from the asker](https://meta.stackexchange.com/questions/214173/why-do-i-need-50-reputation-to-comment-what-can-i-do-instead). - [From Review](/review/late-answers/32826921) – Caitlin Quintero Weaver Oct 04 '22 at 22:53
  • This answer is not useful. – georgekuruvillak Jul 31 '23 at 05:50