Nginx

Adding CORS support to nginx proxy in Kubernetes

2019-05-26

At work, for a couple of months now, we’ve been using Ambassador as our main API gateway to our k8s services. We also have our own authorization service that uses Ambassador’s AuthService mechanism. Recently, we’ve had services that needed CORS support and although Ambassador has features that support the enabling of CORS, we had to update our authorization service to handle CORS-related requests. Instead of doing this, we tried adding the CORS support at the proxy level (nginx).

Cors · Kubernetes · Nginx · Proxy

2 minutes

Using nginx basic authentication in Kubernetes

2019-01-31

This post is somewhat related to a previous post about accessing k8s services using nginx reverse proxy. Let’s try to add a simple basic authentication to these services at the proxy level. Now, this may come in handy in non-production environments but at the very least, make sure that you are doing this over HTTPS as basic authentication credentials are not encrypted. We will be using the htpasswd tool to generate our passwords.

Basic-Auth · Kubernetes · Nginx

2 minutes

Accessing services in Kubernetes

2018-03-31

At Mobingi, when we are developing services that run on Kubernetes, we generally use Minikube or Kubernetes in Docker for Mac. We also have a cluster that runs on GKE that we use for development. In this post, I will share how we access some of the services that are running on our development cluster. Using kubectl port-forward Using kubectl port-forward is probably the cheapest and the most straightforward. For example, if I want to access a cluster service svc1 through my localhost, I use kubectl port-forward like this:

Ingress · Kubectl · Kubernetes · Nginx · Port-Forward

4 minutes