kubereplay

module
v0.0.0-...-7f8ae64 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 22, 2018 License: Apache-2.0

README

Build Status Docker Repository on Quay Go Report Card

kubereplay

Kubereplay aims to make integration of Goreplay and Kubernetes as easy and automated as possible.

Current status

This is an early alpha version. It is not meant to run in production yet.

About

Kubereplay is a Kubernetes add-on to automate capturing and redirection of traffic using Goreplay. It consist of 2 parts that need to run in the cluster - controller and initializer.

How it works:

Kubereplay creates and manages 2 CRDs: Harvesters and Refineries.

Refinery - is responsible for managing dedicated GoReplay deployment used for receiving data from workloads (harvesters). It listens to traffic on tcp socket and then sends it to configured output (stdout, elasticsearch, kafka, http).

Harvester - is used to configure which deployments should be controlled by Kubereplay. Based on selector in Harvester spec Kubereplay will add GoReplay-sidecar to matching deployments. More about initialization process is in the docs

Quickstart

# start minikube with Admission capabilities
$ minikube start --extra-config=apiserver.Admission.PluginNames="Initializers,NamespaceLifecycle,LimitRanger,ServiceAccount,DefaultStorageClass,ResourceQuota"

# start kubereplay controller manager in one console
$ go run cmd/controller-manager/main.go --kubeconfig=~/.kube/config

# start initializer controller in the second
$ go run cmd/initializer-controller/main.go --kubeconfig=~/.kube/config

# add initializer config
$ kubectl create -f sample/initializer-configuration.yaml

# create harvester, refinery and test deployment
$ kubectl create -f sample/harvester.yaml
$ kubectl create -f sample/refinery.yaml
$ kubectl create -f sample/echoserver.yaml

Pre-requisites

  • Kubernetes v1.9+ with admission capabilities enabled.

Deploying Kubereplay

The easiest way to deploy Kubereplay to a real cluster is by using Helm chart:

# add charts repository
$ helm repo add lwolf-charts https://charts.lwolf.org

# update the index if needed
$ helm repo update

# install
$ helm install lwolf-charts/kubereplay

Troubleshooting

If you encounter any issues while using Kubereplay, and your issue is not documented, please file an issue.

Contributing

All kinds of contributions are very much welcome!

  • Fork it
  • Create your feature branch (git checkout -b my-new-feature)
  • Commit your changes (git commit -am 'Added some feature')
  • Push to the branch (git push origin my-new-feature)
  • Create new Pull Request

Changelog

The list of releases is the best place to look for information on changes between releases.

Support

If you're using kubereplay and want to support the development, buy me a beer at Beerpay!

Beerpay

Directories

Path Synopsis
cmd
pkg
apis/kubereplay
Package api is the internal version of the API.
Package api is the internal version of the API.
apis/kubereplay/v1alpha1
+k8s:openapi-gen=true +k8s:deepcopy-gen=package,register +k8s:conversion-gen=github.com/lwolf/kubereplay/pkg/apis/kubereplay +k8s:defaulter-gen=TypeMeta +groupName=kubereplay.lwolf.org
+k8s:openapi-gen=true +k8s:deepcopy-gen=package,register +k8s:conversion-gen=github.com/lwolf/kubereplay/pkg/apis/kubereplay +k8s:defaulter-gen=TypeMeta +groupName=kubereplay.lwolf.org
client/clientset/versioned
This package has the automatically generated clientset.
This package has the automatically generated clientset.
client/clientset/versioned/fake
This package has the automatically generated fake clientset.
This package has the automatically generated fake clientset.
client/clientset/versioned/scheme
This package contains the scheme of the automatically generated clientset.
This package contains the scheme of the automatically generated clientset.
client/clientset/versioned/typed/kubereplay/v1alpha1
This package has the automatically generated typed clients.
This package has the automatically generated typed clients.
client/clientset/versioned/typed/kubereplay/v1alpha1/fake
Package fake has the automatically generated clients.
Package fake has the automatically generated clients.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL