All Projects → piontec → netperf-operator

piontec / netperf-operator

Licence: Apache-2.0 License
Kubernetes operator to measure TCP transmission speed between 2 pods

Programming Languages

go
31211 projects - #10 most used programming language
shell
77523 projects
Dockerfile
14818 projects

Projects that are alternatives of or similar to netperf-operator

td-redis-operator
一款强大的云原生redis-operator,经过大规模生产级运行考验,支持分布式集群、支持主备切换等缓存集群解决方案…The powerful cloud-native redis-operator, which has passed the test of large-scale production-level operation, supports distributed clusters and active/standby switching ...
Stars: ✭ 327 (+738.46%)
Mutual labels:  kubernetes-operator
cloudformation-operator
A Kubernetes operator for managing CloudFormation stacks via a CustomResource
Stars: ✭ 98 (+151.28%)
Mutual labels:  kubernetes-operator
k8s-operator
Write simple Kubernetes operators in a few lines of bash (or your favourite language)
Stars: ✭ 29 (-25.64%)
Mutual labels:  kubernetes-operator
custom-pod-autoscaler-operator
Operator for managing Kubernetes Custom Pod Autoscalers (CPA).
Stars: ✭ 29 (-25.64%)
Mutual labels:  kubernetes-operator
mloperator
Machine Learning Operator & Controller for Kubernetes
Stars: ✭ 85 (+117.95%)
Mutual labels:  kubernetes-operator
k6-operator
An operator for running distributed k6 tests.
Stars: ✭ 170 (+335.9%)
Mutual labels:  kubernetes-operator
varnish-operator
Run and manage Varnish clusters on Kubernetes
Stars: ✭ 47 (+20.51%)
Mutual labels:  kubernetes-operator
wg-operator
Wireguard operator
Stars: ✭ 20 (-48.72%)
Mutual labels:  kubernetes-operator
grafana-operator
An operator for Grafana that installs and manages Grafana instances, Dashboards and Datasources through Kubernetes/OpenShift CRs
Stars: ✭ 449 (+1051.28%)
Mutual labels:  kubernetes-operator
spark-operator
Operator for managing the Spark clusters on Kubernetes and OpenShift.
Stars: ✭ 129 (+230.77%)
Mutual labels:  kubernetes-operator
KubeContext
Mac MenuBar App for Switching your K8s Context
Stars: ✭ 15 (-61.54%)
Mutual labels:  kubernetes-operator
oracle-database-operator
The Oracle Database Operator for Kubernetes (a.k.a. OraOperator) helps developers, DBAs, DevOps and GitOps teams reduce the time and complexity of deploying and managing Oracle Databases. It eliminates the dependency on a human operator or administrator for the majority of database operations.
Stars: ✭ 74 (+89.74%)
Mutual labels:  kubernetes-operator
cdap-operator
CDAP Kubernetes Operator
Stars: ✭ 17 (-56.41%)
Mutual labels:  kubernetes-operator
mysql-operator
Asynchronous MySQL Replication on Kubernetes using Percona Server and Openark's Orchestrator.
Stars: ✭ 810 (+1976.92%)
Mutual labels:  kubernetes-operator
chaos-operator
chaos engineering via kubernetes operator
Stars: ✭ 90 (+130.77%)
Mutual labels:  kubernetes-operator
pulsar-operator
Pulsar Operator creates/configures/manages pulsar clusters atop Kubernetes
Stars: ✭ 68 (+74.36%)
Mutual labels:  kubernetes-operator
kubereplay
Seamless integration of goReplay and Kubernetes
Stars: ✭ 30 (-23.08%)
Mutual labels:  kubernetes-operator
siddhi-operator
Operator allows you to run stream processing logic directly on a Kubernetes cluster
Stars: ✭ 16 (-58.97%)
Mutual labels:  kubernetes-operator
wordpress-operator
Bitpoke Kubernetes operator for WordPress
Stars: ✭ 159 (+307.69%)
Mutual labels:  kubernetes-operator
secureCodeBox-v2
This Repository contains the stable beta preview of the next major secureCodeBox (SCB) release v2.0.0.
Stars: ✭ 23 (-41.03%)
Mutual labels:  kubernetes-operator

Go Report Card Build status

Netperf operator

This is a simple Kubernetes Operator, that uses the legendary netperf tool to run 2 pods in your cluster and measure real TCP connection throughput between them. This project is an example kubernetes operator based on Operator Framework 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. This 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.

Installing

Note: for installation for development, check Developers guide

You need to deploy the controller, its Custom Resource Definition and RBAC resources:

kubectl create -f deploy/crd.yaml
kubectl create -f deploy/rbac.yaml
kubectl create -f deploy/operator.yaml

Users guide

The controller runs tests only in a single namespace, in which the controller is deployed. In this namespace, you have to create the following resource:

apiVersion: "app.example.com/v1alpha1"
kind: "Netperf"
metadata:
  name: "example"
spec:
  serverNode: "minikube"
  clientNode: "minikube"

Wait for the Netperf object to complete (status: Done) and check the measured throughput.

If 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.

Developers guide

There are 2 ways you can build and run the operator:

  • for rapid development and testing: run the operator process outside of cluster, on your development machine, with kubectl configured to access your cluster
  • 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

Common tasks

In both cases, you need to start with following steps:

  • you need to have a functional golang build environment
  • you need to have dep installed
  • clone this repo
mkdir $GOPATH/src/github.com/piontec
cd $GOPATH/src/github.com/piontec
git clone https://github.com/piontec/netperf-operator.git
cd netperf-operator
  • install dependencies
dep ensure
  • create required Custom Resource Definition in the cluster
kubectl create -f deploy/crd.yaml

Running outside of cluster

To build the plugin on your machine, you have to build it with

go build cmd/netperf-operator/main.go

To 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:

export KUBERNETES_CONFIG=/your/path/.kube/config
export WATCH_NAMESPACE=default

Still, 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.

Running inside a cluster

The simplest way is through installing the operator sdk. You also need an image repository, where you can store the ready image:

export IMAGE=my.repo.url/netperf-operator:v0.0.1

Then, build it and push to registry:

operator-sdk build $IMAGE
docker push $IMAGE

As last step, deploy the RBAC definition for the controller and a Deployment that will run it:

kubectl create -f deploy/rbac.yaml
kubectl create -f deploy/operator.yaml
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].