RSS

Mocker Makes it Easy to Mock and Debug Inside a Cluster

Hi, it’s Mia again. A few weeks ago we announced the availability of the first of our Kubernetes testing tools, Mocker on the VS Code extensions marketplace.

Today I want to show you how easy it is to mock a service running inside a cluster and debug if you already have your application deployed in that cluster.

First, deploy a new worker container in the namespace where your application is running.

Screenshot of the first action

Second, once the worker container is deployed, you can create a mock in six easy steps:

Step 1. Enter a port number

Screenshot of entering a port number

Step 2. Select an API protocol

Screenshot of selecting an API protocol

Step 3. Choose the input API definition file

Screenshot of choosing a file

Step 4. Select a service to mock

Screenshot of selecting a service

Step 5. Enter the name of the K8s service that is running

Screenshot of entering the service name

Step 6. Review your choices, and confirm by clicking “Create Mock”

Screenshot of confirming selections

You’ll see a YAML of the generated configuration. If needed, you can edit default values here.

Third, apply the created mock. This will push the mock configurations to Mocker in-cluster. All calls to the mock service will now be routed to Mocker, which will respond with the configured default values.

If you’d like to update mock values, simply rerun the “apply mocks” command and change them.

We’ll have a video walkthrough of this entire process posted shortly!

If you have any feedback or requests, please let me know at support@skyramp.dev.

We are adding more features continually, as well as new Kubernetes testing tools to accompany Mocker, including:

  • a JS library to create complex in-cluster mocks
  • Tester, Mocker’s powerful test client partner

Sign up here to get notified of important new Skyramp launches and announcements.

Thanks,

Mia