{"id":13742499,"url":"https://github.com/piontec/netperf-operator","last_synced_at":"2026-01-18T06:38:05.737Z","repository":{"id":144227194,"uuid":"134417520","full_name":"piontec/netperf-operator","owner":"piontec","description":"Kubernetes operator to measure TCP transmission speed between 2 pods","archived":false,"fork":false,"pushed_at":"2019-03-01T08:17:25.000Z","size":8493,"stargazers_count":40,"open_issues_count":3,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-05-22T14:31:09.673Z","etag":null,"topics":["kubernetes","kubernetes-operator","netperf","networking"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/piontec.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2018-05-22T13:16:09.000Z","updated_at":"2022-04-20T12:14:29.000Z","dependencies_parsed_at":"2024-01-13T01:38:13.065Z","dependency_job_id":"8b0ad37f-6b34-49aa-be3e-278b213466be","html_url":"https://github.com/piontec/netperf-operator","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/piontec%2Fnetperf-operator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/piontec%2Fnetperf-operator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/piontec%2Fnetperf-operator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/piontec%2Fnetperf-operator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/piontec","download_url":"https://codeload.github.com/piontec/netperf-operator/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253170935,"owners_count":21865273,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["kubernetes","kubernetes-operator","netperf","networking"],"created_at":"2024-08-03T05:00:32.996Z","updated_at":"2026-01-18T06:38:05.720Z","avatar_url":"https://github.com/piontec.png","language":"Go","funding_links":[],"categories":["Repository is obsolete"],"sub_categories":["Awesome Operators in the Wild"],"readme":"[![Go Report Card](https://goreportcard.com/badge/github.com/piontec/netperf-operator)](https://goreportcard.com/report/github.com/piontec/netperf-operator)\n[![Build status](https://travis-ci.com/piontec/netperf-operator.svg?branch=master)](https://travis-ci.com/piontec/netperf-operator.svg?branch=master)\n# Netperf operator\nThis is a simple Kubernetes Operator, that uses the legendary [netperf tool](https://hewlettpackard.github.io/netperf/) to run 2 pods in your cluster and measure real TCP connection throughput between them.\nThis project is an example kubernetes operator based on [Operator Framework SDK](https://github.com/operator-framework/operator-sdk). I created it for two reasons: first one, to learn how to build an operator using the SDK, second to solve a network testing problem. \nThis README.md file is about how to develop, build and run the project. If you wanto to learn more about how it works and how to write Kubernetes operators/controllers, head to my [blog](https://www.tailored.cloud/kubernetes/write-a-kubernetes-controller-operator-sdk/).\n\n## Installing\n*Note: for installation for development, check [Developers guide](#dev-guide)*\n\nYou need to deploy the controller, its Custom Resource Definition and RBAC resources:\n```bash\nkubectl create -f deploy/crd.yaml\nkubectl create -f deploy/rbac.yaml\nkubectl create -f deploy/operator.yaml\n```\n\n## Users guide\nThe controller runs tests only in a single namespace, in which the controller is deployed.\nIn this namespace, you have to create the following resource:\n```yaml\napiVersion: \"app.example.com/v1alpha1\"\nkind: \"Netperf\"\nmetadata:\n  name: \"example\"\nspec:\n  serverNode: \"minikube\"\n  clientNode: \"minikube\"\n```\nWait for the Netperf object to complete (`status: Done`) and check the measured throughput.\n\nIf you skip any of the `serverNode` or `clientNode` in `spec:`, they will be normally chosen and assigned by kube's scheduler. If you configure them, node affinity will be used to run on the specific node.\n\n## \u003ca name=\"dev-guide\"\u003e\u003c/a\u003e Developers guide\nThere are 2 ways you can build and run the operator:\n* for rapid development and testing: run the operator process [outside of cluster](#dev-outside), on your development machine, with `kubectl` configured to access your cluster\n* for deploying to cluster and testing full deployment and in cluster operation: you need to build a container image with the operator and deploy it to the cluster\n\n### Common tasks\nIn both cases, you need to start with following steps:\n* you need to have a functional golang build environment\n* you need to have `dep` [installed](https://github.com/golang/dep)\n* clone this repo\n```bash\nmkdir $GOPATH/src/github.com/piontec\ncd $GOPATH/src/github.com/piontec\ngit clone https://github.com/piontec/netperf-operator.git\ncd netperf-operator\n```\n* install dependencies\n```bash\ndep ensure\n```\n* create required Custom Resource Definition in the cluster\n```bash\nkubectl create -f deploy/crd.yaml\n```\n\n### \u003ca name=\"dev-outside\"\u003e\u003c/a\u003e Running outside of cluster\nTo build the plugin on your machine, you have to build it with\n```bash\ngo build cmd/netperf-operator/main.go\n```\n\nTo run it, you have to set the following 2 environment variables that point to your `.kube/config` file and define the name of a Namespace to monitor:\n```bash\nexport KUBERNETES_CONFIG=/your/path/.kube/config\nexport WATCH_NAMESPACE=default\n```\n\nStill, if you're using VS Code with go plugin (which I highly recommend), I incuded in the repo my `launch.json` file. Skip the manual steps above, open the project, set your environment variables in the `launch.json` file and hit `F5` in VS Code - you're ready to go.\n\n### \u003ca name=\"dev-incluster\"\u003e\u003c/a\u003e Running inside a cluster\nThe simplest way is through [installing the operator sdk](https://github.com/operator-framework/operator-sdk#quick-start). You also need an image repository, where you can store the ready image:\n```bash\nexport IMAGE=my.repo.url/netperf-operator:v0.0.1\n```\nThen, build it and push to registry:\n```bash\noperator-sdk build $IMAGE\ndocker push $IMAGE\n```\nAs last step, deploy the RBAC definition for the controller and a Deployment that will run it:\n```bash\nkubectl create -f deploy/rbac.yaml\nkubectl create -f deploy/operator.yaml\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpiontec%2Fnetperf-operator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpiontec%2Fnetperf-operator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpiontec%2Fnetperf-operator/lists"}