* authenticate: set cookie secure as default. * authenticate: remove single flight provider. * authenticate/providers: Rename “ProviderData” to “IdentityProvider” * authenticate/providers: Fixed an issue where scopes were not being overwritten * proxy/authenticate : http client code removed. * proxy: standardized session variable names between services. * docs: change basic docker-config to be an “all-in-one” example with no nginx load. * docs: nginx balanced docker compose example with intra-ingress settings. * license: attribution for adaptation of goji’s middleware pattern.
3.2 KiB
Kubernetes
This quickstart will show you how to deploy Pomerium with Kubernetes. For the purpose of this guide, we will be using Google's Kubernetes Engine. However, there are countless ways to work with Kubernetes:
- Google Kubernetes Engine (GKE)
- Azure Kubernetes Service
- Amazon Elastic Kubernetes Service (Amazon EKS)
- OpenShift Kubernetes
- Or locally, with minikube
Most of the following steps should be very similar using any other provider.
:::tip
Google Cloud Platform has a free trial with $300 credits.
:::
Prerequisites
- A Google Cloud Account
- A configured identity provider
- Install kubectl
- Install the Google Cloud SDK
Download
Retrieve the latest copy of pomerium's source-code by cloning the repository.
git clone https://github.com/pomerium/pomerium.git $HOME/pomerium
Configure
Edit the the example kubernetes files to match your identity provider settings:
./docs/docs/examples/authenticate.deploy.yml
./docs/docs/examples/authenticate.service.yml
./docs/docs/examples/proxy.deploy.yml
./docs/docs/examples/proxy.service.yml
./docs/docs/examples/ingress.yml
Place your domain's wild-card TLS certificate (privkey.pem
and cert.pem
) in the root of the repository. If you don't have one handy, the included script generates one from LetsEncrypt.
Edit ./scripts/kubernetes_gke.sh making sure to change the identity provider secret value to match your identity provider settings.
Run
Run ./scripts/kubernetes_gke.sh which will:
- Provision a new cluster
- Create authenticate and proxy deployments.
- Provision and apply authenticate and proxy services.
- Configure an ingress load balancer.
sh ./scripts/kubernetes_gke.sh
You should see roughly the following in your terminal. Note, provisioning does take a few minutes.
And if you check out Google's Kubernetes Engine dashboard you'll see something like:
Navigate
Open a browser and navigate to httpbin.your.domain.com
.
You should see something like the following in your browser.