All Projects → Kong → kubernetes-sidecar-injector

Kong / kubernetes-sidecar-injector

Licence: Apache-2.0 license
Easy Service Mesh with Kong and Kubernetes

Programming Languages

lua
6591 projects
shell
77523 projects
Makefile
30231 projects
Dockerfile
14818 projects

Projects that are alternatives of or similar to kubernetes-sidecar-injector

kong-plugin-grpc-gateway
Kong Plugin to transcode REST request to gRPC - this plugin has been moved into https://github.com/Kong/kong, please open issues and PRs in that repo
Stars: ✭ 15 (-25%)
Mutual labels:  kong, kong-plugin
kong-plugin-http-anti-replay-attack
http-anti-replay-attack [防重放攻击]
Stars: ✭ 20 (+0%)
Mutual labels:  kong, kong-plugin
kong-map
Kongmap is a free visualization tool which allows you to view and edit configurations of your Kong API Gateway Clusters, including Routes, Services, and Plugins/Policies. The tool is being offered for installation via Docker and Kubernetes at this time.
Stars: ✭ 60 (+200%)
Mutual labels:  kong, kong-plugin
kong-plugin-acme
Let's Encrypt and ACMEv2 integration with Kong - this plugin has been moved into https://github.com/Kong/kong, please open issues and PRs in that repo
Stars: ✭ 36 (+80%)
Mutual labels:  kong, kong-plugin
meshery-kuma
Meshery Adapter for Kuma
Stars: ✭ 35 (+75%)
Mutual labels:  kong, service-mesh
kong-api-gateway-plugin-and-microservices-demo
Creating plugin for Kong API Gateway and Simple micro services example
Stars: ✭ 20 (+0%)
Mutual labels:  kong, kong-plugin
kong-circuit-breaker
Kong plugin for wrapping all proxy calls with a circuit-breaker
Stars: ✭ 27 (+35%)
Mutual labels:  kong, kong-plugin
Mosn
The Cloud-Native Network Proxy Platform.
Stars: ✭ 3,451 (+17155%)
Mutual labels:  service-mesh, sidecar
kong-plugin-url-rewrite
Kong API Gateway plugin for url-rewrite purposes
Stars: ✭ 43 (+115%)
Mutual labels:  kong, kong-plugin
Kuma
🐻 The Universal Service Mesh. CNCF Sandbox Project.
Stars: ✭ 2,516 (+12480%)
Mutual labels:  kong, service-mesh
kong-scalable-rate-limiter
Kong plugin for Rate Limiting at high throughputs.
Stars: ✭ 19 (-5%)
Mutual labels:  kong, kong-plugin
gluu-gateway
Gluu API 🚀 and Web Gateway 🎯
Stars: ✭ 29 (+45%)
Mutual labels:  kong, kong-plugin
kong-plugin-api-response-merger
Kong API response merger plugin
Stars: ✭ 14 (-30%)
Mutual labels:  kong, kong-plugin
kong-plugin-zipkin
A Kong plugin for propogating zipkin spans and reporting spans to a zipkin server - this plugin has been moved into https://github.com/Kong/kong, please open issues and PRs in that repo
Stars: ✭ 60 (+200%)
Mutual labels:  kong, kong-plugin
kong-oidc-auth
OpenID Connect authentication with Kong gateway
Stars: ✭ 41 (+105%)
Mutual labels:  kong
Envoy-Pilot
Envoy xDS Server with Consul
Stars: ✭ 72 (+260%)
Mutual labels:  service-mesh
merbridge
Use eBPF to speed up your Service Mesh like crossing an Einstein-Rosen Bridge.
Stars: ✭ 469 (+2245%)
Mutual labels:  service-mesh
php-nacos
阿里巴巴nacos配置中心-PHP客户端
Stars: ✭ 167 (+735%)
Mutual labels:  service-mesh
mango
mango is a man-page generator for the Go flag, pflag, cobra, coral, and kong packages
Stars: ✭ 191 (+855%)
Mutual labels:  kong
lua-resty-timer
Extended timers for OpenResty
Stars: ✭ 20 (+0%)
Mutual labels:  kong

DEPRECATED

This repository has been deprecated. Please use docs for Kong for Kubernetes for installation and configuration of Kong on Kubernetes.

Howto

Minikube

Start minikube with mutation admission webhook support.

minikube start

Old minikube/kubernetes < 1.9 will need this --extra-config:

minikube start --extra-config=apiserver.admission-control="NamespaceLifecycle,LimitRanger,ServiceAccount,DefaultStorageClass,DefaultTolerationSeconds,MutatingAdmissionWebhook,ValidatingAdmissionWebhook,ResourceQuota"

For inspecting the running system inside of minikube with docker, run:

eval $(minikube docker-env)

Setup Kong

### Run Kong on k8s
git clone https://github.com/Kong/kong-dist-kubernetes.git
cd kong-dist-kubernetes
make run_<postgres|cassandra>
kubectl -n kong get all

### Turn on kong plugins

kubectl port-forward -n kong svc/kong-control-plane 8001:8001 &
curl localhost:8001/plugins -d name=kubernetes-sidecar-injector

### Turn on sidecar injection
cat <<EOF | kubectl create -f -
apiVersion: admissionregistration.k8s.io/v1beta1
kind: MutatingWebhookConfiguration
metadata:
  name: kong-sidecar-injector
webhooks:
- name: kong.sidecar.injector
  rules:
  - apiGroups: [""]
    apiVersions: ["v1"]
    resources: ["pods"]
    operations: [ "CREATE" ]
  failurePolicy: Fail
  namespaceSelector:
    matchExpressions:
    - key: kong-sidecar-injection
      operator: NotIn
      values:
      - disabled
  clientConfig:
    service:
      namespace: kong
      name: kong-control-plane
      path: /kubernetes-sidecar-injector
    caBundle: $(kubectl config view --raw --minify --flatten -o jsonpath='{.clusters[].cluster.certificate-authority-data}')
EOF

Going forward any pod's that start get a Kong sidecar automatically injected which all data from the containers of that pod will flow through

For example starting the bookinfo.yaml example

kubectl apply -f https://raw.githubusercontent.com/istio/istio/release-1.1/samples/bookinfo/platform/kube/bookinfo.yaml

Every pod has an additional Kong docker dataplane image running

NAME                                  READY   STATUS    RESTARTS   AGE
pod/details-v1-5df567f4f6-vfj5z       2/2     Running   0          2m53

Cleanup

cd kong-dist-kubernetes
make clean
pkill -f port-forward

Debugging

Logs from api server

These logs can be useful if the webhook doesn't seem to be getting called.

kubectl logs -n kube-system pod/kube-apiserver-minikube

Logs from controller manager

Watch the logs of kube-controller-manager-minikube for JSONPatch issues

kubectl logs -n kube-system pod/kube-controller-manager-minikube

Logs from kong

while true; do kubectl logs -n kong -f $(kubectl get pods -l app=kong-control-plane -n kong -o name); done

Working on the plugin

docker build . -t kong && kubectl -n kong delete $(kubectl get pods -l app=kong-control-plane -n kong -o name)
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].