DEV Community

3logy
3logy

Posted on

Deploy a castlemock mockserver on Kubernetes with helm.

Table Of Contents

This is my first post ever

What is a mockserver?

A mock server is actually a fake API that simulates a real server response. There are many articles about certain open source solutions like mockserver or about the general concept of mocking APIs

Why should a team use a mock server in their development lifecycle? There could be two good reasons :

  • Simplify testing
  • Decoupling development teams

After we noticed a tight coupling behavior between a product team and my team, I decided to deploy a mock server to reduce the dependencies between the team. The mock server should have the following properties:

  • could be used for automation tests as well as for manual tests
  • Easy setup and maintenance by the business analyst
  • can process REST as SOAP requests

I found out that there are a lot of open source solution for mocking api. From mock-server to castlemock

Install Docker and Kubernetes on MacOs

This is pretty easy.
The following steps can help you with:

When that's done, all you have to do is pull the latest version of castlemock from Docker Hub :

 docker pull castlemock/castlemock

If everything works, install Helm using the following commands :

 brew install helm

It's all.

Install castlemock with helm

Assuming Docker, Kubernetes and Helm are install and running. Do the following steps:

So easy it's when working with Helm.

Many thanks to Muhammad Hewedy πŸ‘ , who helps me on Twitter to get into Castlemock deployment on Kubernetes.

Top comments (3)

Collapse
 
mhewedy profile image
Muhammad Hewedy

You welcome :)

Collapse
 
bosofelipe profile image
Felipe Thiago Boso

Hi @3logy , Is possible running this aplication using minikube, for a local tests?

I run the helm an access chart-example.local, but is out of service

Collapse
 
bosofelipe profile image
Felipe Thiago Boso

I changed to NodePort in a ingress tag, and solve my problem!