Skip to content
No description, website, or topics provided.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
ipfs-cluster all: gofmt Jun 13, 2018

Get Started

kubernetes-ipfs works with both a full kubernetes deployment, or the minikube all-in-one system

With Minikube

./ to set minikube up in a clean state

./ to create go-ipfs and grafana deployments on minikube

Running tests

go run main.go tests/simple-add-and-cat.yml

The go application returns 0 when expectations were met, 1 when they failed

Metrics Gathering: Prometheus/Grafana

The following steps detail how to access the Grafana web UI's on your local machine.

Before running the script, ensure that the grafana-core deployment in the prometheus-manifests.yml has these variables set as shown:

  value: "false"
  value: "true"
  value: Admin

This allows you to easily access the Grafana interface without any sort of authentication.

Then, after running, you need to tell Kubernetes to forward connections on one of your local ports to the port that's hosting the Grafana interface. To do so, you can:

  1. Get the name of the pod hosting the grafana-core deployment. The command with an example output:

    $ kubectl get pods --namespace=monitoring | grep grafana-core | awk '{print $1}'
  2. Tell kubectl to forward all connections on a local port to port 3000 on the grafana-core pod found in the previous step. In this example, we simply use port 3000 for the local port as well:

    kubectl port-forward --namespace=monitoring grafana-core-2701824778-j52cq 3000:3000

From there, you can access Grafana's web UI by navigating to localhost:3000 in your browser.

Example Reports

Simple Add > Cat test with 2 nodes

go-ipfs:v0.4.0 -

go-ipfs:v0.4.4 -

go-ipfs:v0.4.5-pre1 -

Simple Add > Pin test with 5 nodes

go-ipfs:v0.4.5-pre1 -

Writing tests

The tests are specified in a .yml file for each test.


  • name: Name the test
  • nodes: How many nodes to run for the test. Kubernetes-ipfs will automatically scale the deployment to match the value here before starting
  • times: How many times to run the full test.
  • expected: define the number of expected outcomes. This value should be outcomes per test * times. Specify the expected successes, failures, and timeouts.


Each step contains a few flags that specify how they will be run, and a cmd which is the command to run on the node

  • name: Name the step
  • on_node: On which node number should we run this test?
  • end_node: When specified, we will run this test in parallel from on_node to end_node inclusive. Useful for testing simultaneous group interactions.
  • selection: An alternate way to choose the nodes that run a command. Allows for specifying ranges, percents and consistent subsets succinctly
  • for: An optional way to specify that a step be ran more than once. Can specify an iteration bound or a for each style iteration over an input array
  • outputs: Specify a line number of output and what environment variable to save it to. It can be used for the following input section
  • inputs: Specify the environment variables to take in for this command.
  • cmd: Verbatim command to run on the node. Bash variables will be evaluated.
  • timeout: At this many seconds, the step will be cancelled and counted as "timeout".
  • assertions: At the moment, only should_be_equal_to Specify that a line number of stdout should be equal to a line you have used save_to on. On success, adds a success count, on fail, adds a failure count.
You can’t perform that action at this time.