A wrapper with some flow!
Talk to the kubernetes api in a simpler way in your kubernetes operators written in python.
Initialize your kubernetes wrapper class with the default namespace you want to use.
from kubernetes_wrapper import Kubernetes
[..]
self.kubernetes = Kubernetes("my-namespace")
Apply your manifests just like you would do with kubectl
:
self.kubernetes.apply(Path("my-manifest.yaml").read_text())
Delete your manifests the same way:
self.kubernetes.delete(Path("my-manifest.yaml").read_text())