This is the RESTful API for manageing customers. It allows you to create, retrieve, update, and delete customers.
Clone this repository and open the folder in a container.
- Method: POST
- Description: Creates a customer.
- Method: GET
- Description: Read an existing customer with specific customer ID.
- Method: PUT
- Description: Update an existing customer.
- Method: GET
- Description: List existing customers and query customer attributes like name, email, address, phone number and member since
- Method: DELETE
- Description: Delete an existing customer with specific customer ID.
- Method: PUT
- Description: Suspend an existing customer with specific customer ID.
The API returns a JSON object with a status code and a string message when an error occurs. For example, { status.HTTP_404_NOT_FOUND, f"Customer with id '{customer_id}' was not found.", }
.
Run 'make test' to execute the test suite.
- Delete cluster: make cluster-rm
- Create cluster: make cluster
- Build the docker image: docker build -t customers:latest .
- Create tag for image: docker tag customers:latest cluster-registry:5000/customers:latest
- Push the docker image: docker push cluster-registry:5000/customers:latest
- Apply Kubernetes: kc apply -f k8s/ or alternatively, make deploy