Managing jobs and cron jobs in kubernetes

9/22/2020

Can I manage jobs in K8S through its API requests? I want my application to interact with the infrastructure through the API k8s.
For example, replace, change, delete jobs? I did not find any useful literature, but I will be very grateful for it

-- ASTyurin
continuous-deployment
continuous-integration
jobs
kubernetes

1 Answer

9/22/2020

Can I manage jobs in K8S through its API requests?

Yes, you can.

I want my application to interact with the infrastructure through the API k8s. For example, replace, change, delete jobs?

The Kubernetes API is a resource-based (RESTful) programmatic interface provided via HTTP. It supports retrieving, creating, updating, and deleting primary resources via the standard HTTP verbs (POST, PUT, PATCH, DELETE, GET).

Ref: Kubernetes API Concepts

Recommendation: Use Kubernetes client library for implementing your REST client.

-- Kamol Hasan
Source: StackOverflow