Is there a way to create and update kubernetes cloud objects via a remote API? If so, is this documented anywhere?
My use case is that I am creating and updating EKS clusters through terraform and I want to automate the process of pointing jenkins to these new clusters.
Thanks in advance. I see that topics request posting the version of jenkins and plugins but since this is a general question, I don’t think this is necessary.
As far as I know, you can manage Kubernetes objects via the Kubernetes API.
The Kubernetes API is a RESTful API and it allows you to create, update, delete, and retrieve Kubernetes objects.
To interact with the Kubernetes API, you can use kubectl, client libraries, or make HTTP requests directly.
The API is documented in the Kubernetes API reference.
However, if you want to configure Jenkins to point to these new clusters, you might need to interact with the Jenkins API instead.
Jenkins has a RESTful API that allows you to retrieve information from Jenkins and to configure Jenkins programmatically.
For example, if you’re using the Kubernetes plugin in Jenkins, I think you could configure it via the Jenkins API (I haven’t tested it specifically, but most of the things I need are there in the REST API. ).
I don’t know how to link that to Terraform, though.
Hello and thanks for the welcome!
I am aware of both kubernetes and jenkins APIs. I’ve already looked through the Jenkins API documentation and haven’t found a way to do this. If you know of a way to do this, please share a specific link.