Reset k8s cluster

if cluster is not in use then reset the k8s cluster from the server

Official repository of Kubespray - https://github.com/kubernetes-sigs/kubespray

To ensure efficiency and flexibility, reset the Kubernetes cluster whenever the system test server is idle or developers request a server change. This practice optimizes resource utilization and aligns with dynamic development needs, promoting a streamlined and adaptable development environment.

For Kubernetes cluster reset by kubespray we require inventory file -

all:
  hosts:
    dev:
      ansible_host: x.x.x.x
      ip: x.x.x.x
  children:
    kube-master:
      hosts:
        dev:
    kube-node:
      hosts:
        dev:
    etcd:
      hosts:
        dev:
    k8s-cluster:
      children:
        kube-master:
        kube-node:
    calico-rr:
      hosts: {}

Run below command to Reset the k8s cluster -

ansible-playbook -i inventory.yaml kubespray/reset.yml

Following completion of the Ansible playbook, the setup will resemble the image provided.

Last updated