Sign inSign up

swisstxt/http-cache-controller

By swisstxt

Updated over 3 years ago

https://github.com/swisstxt/http-cache-controller

Image
0

502

swisstxt/http-cache-controller repository overview

k8s http-cache-controller

https://github.com/swisstxt/http-cache-controller

a simple http cache layer which routes traffic trough an nginx reverse proxy with caching

Installation

kubectl apply -f https://raw.githubusercontent.com/swisstxt/http-cache-controller/master/service-account.yaml
kubectl apply -f https://raw.githubusercontent.com/swisstxt/http-cache-controller/master/controller-deployment.yaml
kubectl apply -f https://raw.githubusercontent.com/swisstxt/http-cache-controller/master/cache-deployment.yaml

Usage

annotate your service with the following annotations:

metadata:
  annotations:
    swisstxt.ch/http-cache-enabled: "true"

update your ingress to use the cached service

before:

spec:
  rules:
  - host: mydomain.com
    http:
      paths:
      - backend:
          service:
            name: myservicename
            port:
              name: http

after:

spec:
  rules:
  - host: mydomain.com
    http:
      paths:
      - backend:
          service:
            name: myservicename-cached
            port:
              name: http

HAPPY CACHING!

Tag summary

Content type

Image

Digest

sha256:8c4a3e55f

Size

76.7 MB

Last updated

over 3 years ago

docker pull swisstxt/http-cache-controller