https://github.com/philips/backplane-kubernetes-ingress
prototype Kubernetes Ingress Controller for Backplane.io
https://github.com/philips/backplane-kubernetes-ingress
Last synced: 10 months ago
JSON representation
prototype Kubernetes Ingress Controller for Backplane.io
- Host: GitHub
- URL: https://github.com/philips/backplane-kubernetes-ingress
- Owner: philips
- Created: 2017-05-06T20:10:57.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2017-05-06T22:11:32.000Z (about 9 years ago)
- Last Synced: 2025-04-14T03:42:58.711Z (about 1 year ago)
- Homepage:
- Size: 290 KB
- Stars: 28
- Watchers: 5
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Backplane.io Ingress Controller
Simple setup to get [Backplane.io](https://www.backplane.io/) hooked up as a Kubernetes Ingress Controller. This makes it possible to do things like have a publicly available load balancer from a behind-the-firewall install with say [Tectonic Bare-metal](https://coreos.com/tectonic) or [minikube](https://github.com/kubernetes/minikube).
## Setup Backplane Ingress Controller
Setup the Backplane secret:
```
export BACKPLANE_TOKEN=SECRETS_GO_HERE
kubectl create secret -n kube-system generic backplane-token --from-literal=bptoken=${BACKPLANE_TOKEN}
```
Configure any backplane labels, importantly the endpoint:
```
kubectl create configmap backplane-config -n kube-system --from-literal=labels=endpoint=patient-spark-20.backplaneapp.io,release=v1
```
Deploy backplane Ingress and a default 404 page
```
kubectl create -f https://raw.githubusercontent.com/philips/backplane-kubernetes-ingress/master/ingress-controller.yaml
kubectl create -f https://raw.githubusercontent.com/kubernetes/ingress/master/examples/deployment/nginx/default-backend.yaml
```
If all goes well the [Backplane Dashboard](https://www.backplane.io/dashboard) should show a single backend.

## Debugging Logs
NGINX:
```
kubectl get pods --namespace=kube-system -l k8s-app=backplane-ingress-controller -o jsonpath='{range .items[*]}{.metadata.name}{"\n"}{end}' | xargs -I {} kubectl -n kube-system -c nginx-ingress-controller logs {}
```
Backplane Agent:
```
kubectl get pods --namespace=kube-system -l k8s-app=backplane-ingress-controller -o jsonpath='{range .items[*]}{.metadata.name}{"\n"}{end}' | xargs -I {} kubectl -n kube-system -c bpagent logs {}
```
## Deploy an App w/ Ingress
```
kubectl run --image=quay.io/philips/host-info:latest host-info
kubectl expose deployment host-info --session-affinity=None --port 8080
kubectl create -f https://raw.githubusercontent.com/philips/host-info/master/ingress.yaml
```
## Scaling
Adding additional backends is as simple as scaling the deployment:
```
kubectl scale deployments backplane-ingress-controller -n kube-system --replicas=3
```

## Future Work
- Make a native Backplane Ingress controller instead of relying on nginx see https://github.com/kubernetes/ingress/tree/master/examples/custom-controller