How to react to external resources outside of K8S #3633
-
We have a Cloud API with Resources/State that lives outside of K8S. Now we are trying to write a Controller that
So far I could not find a guidance how best to tackle that with Kubebuilder. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
It's essential to fully understand the context to provide the best design solution. Additionally, it might be challenging for anyone here to come up with a domain-specific design solution. Controllers in Kubernetes primarily watch and observe changes in resources within the cluster, not outside. When a resource in the cluster is changed, created, or deleted, the reconciliation process is triggered. Ideally, your solution should run until the desired state declared in the reconciliation becomes the actual state. However, you can explore options like: Using Go for HTTP Requests: Leverage Go to make HTTP requests to any API/server. There are multiple approaches:
Regarding Kubebuilder's Role: Kubebuilder helps in creating projects, mainly following the Operator concept. It facilitates the process but requires understanding specific implementation details for unique scenarios. Therefore, I recommend checking out Kubebuilder's documentation for getting started and understanding fundamental concepts. Given the information provided, offering specific guidance is challenging. If you have more detailed questions about utilizing Kubebuilder for your specific use case, please feel free to open new issues or discussion topics. I hope you understand why I am closing this one, but feel free to re-open it if you see fit or to open new ones. thank you ! |
Beta Was this translation helpful? Give feedback.
Hi @AndreasBergmeier6176,
It's essential to fully understand the context to provide the best design solution. Additionally, it might be challenging for anyone here to come up with a domain-specific design solution. Controllers in Kubernetes primarily watch and observe changes in resources within the cluster, not outside. When a resource in the cluster is changed, created, or deleted, the reconciliation process is triggered. Ideally, your solution should run until the desired state declared in the reconciliation becomes the actual state.
However, you can explore options like:
Using Go for HTTP Requests: Leverage Go to make HTTP requests to any API/server. There are multiple approaches: