- This Spring Boot application showcases the integration of the Kubernetes Java Client API to manage Kubernetes resources efficiently.
- The implemented features cover the processes of listing, creating, editing, and deleting the following Kubernetes resources:
- Namespace
- Pod
- Service
- Deployment
Method | Url | Description | Request Body | Header | Valid Path Variable | No Path Variable |
---|---|---|---|---|---|---|
GET | /api/v1/kubernetes/deployments/listDeployments | List Deployments | ||||
POST | /api/v1/kubernetes/deployments/createDeployment | Create Deployment | CreateDeploymentRequest | |||
PUT | /api/v1/kubernetes/deployments/editDeployment | Edit Deployment | EditDeploymentRequest | |||
DELETE | /api/v1/kubernetes/deployments/deleteDeployment | Delete Deployment | DeleteDeploymentRequest | |||
GET | /api/v1/kubernetes/namespaces/listNamespaces | List Namespaces | ||||
POST | /api/v1/kubernetes/namespaces/createNamespace | Create Namespace | CreateNamespaceRequest | |||
PUT | /api/v1/kubernetes/namespaces/editNamespace | Edit Namespace | EditNamespaceRequest | |||
DELETE | /api/v1/kubernetes/namespaces/deleteNamespace | Delete Namespace | DeleteNamespaceRequest | |||
GET | /api/v1/kubernetes/pods/listPods | List Pods | ||||
POST | /api/v1/kubernetes/pods/createPod | Create Pod | CreatePodRequest | |||
PUT | /api/v1/kubernetes/pods/editPod | Edit Pod | EditPodRequest | |||
DELETE | /api/v1/kubernetes/pods/deletePod | Delete Pod | DeletePodRequest | |||
GET | /api/v1/kubernetes/services/listServices | List Services | ||||
POST | /api/v1/kubernetes/services/createService | Create Service | CreateServiceRequest | |||
PUT | /api/v1/kubernetes/services/editService | Edit Service | EditServiceRequest | |||
DELETE | /api/v1/kubernetes/services/deleteService | Delete Service | DeleteServiceRequest | |||
- Java 17
- Spring Boot 3.0
- Restful API
- Lombok
- Maven
- Junit5
- Mockito
- Integration Tests
- Postman
1 ) Install minikube to access this link https://minikube.sigs.k8s.io/docs/start/
2 ) Open command prompt and install kubectl through this command shown below
minikube kubectl --
3 ) Start minikube through this command shown below.
minikube start
To build and run the application with Maven
, please follow the directions shown below;
$ cd kubernetesjavaclientapi
$ mvn clean install
$ mvn spring-boot:run