Ingress API key

Let’s say you just wanted to have a simple API-key for your nginx ingress. The if structures in nginx configs are an interesting way to do this. There might be more effecient ways to do this, but for now this will do. Example example-ingress.yaml: apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: some-ingress annotations: nginx.ingress.kubernetes.io/use-regex: "true" nginx.ingress.kubernetes.io/configuration-snippet: |if ($arg_api_key != 'yourVerySecretKey') { return 401 'Access denied!'; } if ($http_x_api_key != 'yourVerySecretKey') { return 401 'Access denied!...

February 15, 2022 · 1 min · Simon Koudijs

Azure functions auth in k8s

On this docker hub page you can find all functions containers. This will allow you to run your Azure Functions inside kubernetes. But how do you set this up? What things are not included? Functions in Azure itself Azure functions make it very easy to run your pieces of code in Azure. As I currently see it: Microsoft divided ‘core’ functions from hosting functions. The GUI inside Azure allows you to:...

February 11, 2022 · 1 min · Simon Koudijs