skip to Main Content

I’m migrating helm2 releases to helm3. One of my resources is redis and it’s protected from migration. I have to remove it using

kubectl delete statefulsets.apps --cascade=false -nkube-system testme-redis-master

I wanna use the Kubernetes python lib, only that I cannot find the matching function.
I’m using CoreV1API.

3

Answers


  1. I wanna use the Kubernetes python lib, only that I cannot find the matching function.

    You must look in the right API Group.

    I’m using CoreV1API.

    StatefulSets is in AppsV1 and not in CoreV1, so check that API Group instead.

    See the Python Kubernetes client example for Deployment in AppsV1 API Group, it is very similar to StatefulSet

    Login or Signup to reply.
  2. You can go through the following reference doc link which has reference for all the AppsV1 APIs including API usage for deleting the statefulset.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search