This document describes how to deploy kubefork in a cluster.
Go 1.16+ kubernetes 1.25+
In addition, please install the following into your cluster in advance deployment-duplicator Istio 1.15+ Emissary-ingress 3.1+
See kubefork-controller.
In order to perform kubefork, it is necessary to apply the ForkManager resource, which configures which headers are looked at and which hosts and services correspond to. The most basic ForkManager manifest is as follows
apiVersion: fork.k8s.wantedly.com/v1beta1
kind: ForkManager
metadata:
name: kubefork-manager
namespace: manager
spec:
ambassadorID: fork-ambassador
headerKey: x-fork-identifier
upstreams:
- host: example.com
original: your-service:80In this case, the header key referenced to distribute communications is x-fork-identifier, and communications to example.com are normally sent to port 80 of the service your-service.
For a detailed specification of ForkManager, see forkmanager_types.go.
After applying ForkManager, you should install the command line tool kubeforkctl.
Currently, in order to do kubefork, users must have the ability to propagate certain headers in their applications. See the kubefork documentation for details.