Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clusters Concepts page #1330

Merged
merged 45 commits into from
Jun 20, 2024
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
b009b88
adds initial cluster sections
ZPain8464 Mar 26, 2024
c979351
fills out clusters docs sections
ZPain8464 Mar 26, 2024
a638251
runs prettier
ZPain8464 Mar 26, 2024
d7f7e79
corrects the ppl link
ZPain8464 Mar 26, 2024
ae6ac68
adds feedback and additional sections
ZPain8464 Mar 27, 2024
8918da7
runs prettier
ZPain8464 Mar 27, 2024
a81c21d
adds word to cspell
ZPain8464 Mar 27, 2024
e12b3ab
updates text
ZPain8464 Mar 28, 2024
43f2334
adds text
ZPain8464 Apr 1, 2024
10ea472
adds more TODOs
ZPain8464 Apr 1, 2024
6634f7c
adds additional sections
ZPain8464 Apr 3, 2024
b84228b
runs prettier
ZPain8464 Apr 3, 2024
a17460d
adds feedback
ZPain8464 May 1, 2024
d1b9695
updates cluster docs
ZPain8464 May 2, 2024
0e0a9a9
updates sections
ZPain8464 May 3, 2024
81c3c28
updates diagram
ZPain8464 May 3, 2024
b128807
reorganizes sections
ZPain8464 May 8, 2024
26a967a
updates cluster docs
ZPain8464 May 9, 2024
dcd6ba7
udpates cluster docs
ZPain8464 May 10, 2024
bd9e873
runs prettier
ZPain8464 May 10, 2024
012bb34
removes unnused image
ZPain8464 May 10, 2024
5fac369
fixes cspell errors
ZPain8464 May 10, 2024
b7ddd99
updates k8s steps
ZPain8464 May 21, 2024
4898425
updates clusters docs
ZPain8464 May 21, 2024
2919410
runs prettier
ZPain8464 May 21, 2024
3e1e7bb
updates text
ZPain8464 May 31, 2024
3dd2bd1
updates cluster docs
ZPain8464 Jun 3, 2024
c087278
Update content/docs/concepts/clusters.mdx
ZPain8464 Jun 3, 2024
bed25db
Update content/docs/concepts/clusters.mdx
ZPain8464 Jun 3, 2024
0fa3d5a
Update content/docs/concepts/clusters.mdx
ZPain8464 Jun 3, 2024
8953b1c
Update content/docs/concepts/clusters.mdx
ZPain8464 Jun 3, 2024
cfd45e3
Update content/docs/concepts/clusters.mdx
ZPain8464 Jun 3, 2024
356eab7
Update content/docs/concepts/clusters.mdx
ZPain8464 Jun 3, 2024
5a2cd00
Update content/docs/concepts/clusters.mdx
ZPain8464 Jun 3, 2024
b705a7d
Update content/docs/concepts/clusters.mdx
ZPain8464 Jun 3, 2024
6fd4095
Update content/docs/concepts/clusters.mdx
ZPain8464 Jun 3, 2024
26a314f
Update content/docs/concepts/clusters.mdx
ZPain8464 Jun 3, 2024
f26e233
addresses feedback
ZPain8464 Jun 3, 2024
55e3fe5
incorporates feedback
ZPain8464 Jun 20, 2024
3b20d8f
fixes wording
ZPain8464 Jun 20, 2024
21254de
merges main
ZPain8464 Jun 20, 2024
a34df09
more text edits
ZPain8464 Jun 20, 2024
db20f9a
fixes broken links
ZPain8464 Jun 20, 2024
b957a64
fixes cspell error
ZPain8464 Jun 20, 2024
e50ca6a
correct text
ZPain8464 Jun 20, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
186 changes: 186 additions & 0 deletions content/docs/concepts/clusters.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,186 @@
---
id: clusters
title: Clusters
description: This document describes Clusters in Pomerium Zero.
keywords: [clusters, pomerium zero]
sidebar_label: Clusters
sidebar_position: 1
---

import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

# Clusters in Pomerium Zero

This document describes Clusters in Pomerium Zero.
ZPain8464 marked this conversation as resolved.
Show resolved Hide resolved

TODO: include a video that walks through Clusters

## Clusters overview

A **Cluster** represents a single Pomerium deployment managed by Pomerium Zero, our hosted control plane. Pomerium Zero enables you to configure cluster settings for your personal account or organization.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can think of a Pomerium cluster as a completely distinct deployment of Pomerium, and allows you to effectively shard you deployments for performance, governance, security, or management purposes.

I think we should probably discuss common reasons people would want to use a cluster.


Each cluster gets its own:

- **Cluster identity**
- **Cluster domain**
Copy link
Contributor

@wasaga wasaga Apr 29, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe we need add a section describing the cluster automatic domain and custom domains. either way, as a user I may read that as "cluster is per domain", which is not accurate.

Suggested change
- **Cluster domain**
- **Cluster domains**

- **Cluster settings**
- **Routes and Policies**
- **Wildcard certificates**

### Cluster architecture

TODO: It would be ideal to get an architecture diagram here.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

An entity diagram would make the relationship more obvious.


### Cluster identity
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd suggest we standardize on the term "cluster token" for this concept, but open to feedback from others.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1


When you create an account in Pomerium Zero, a new **Cluster Token** is generated and assigned to your personal account. This cluster token, which is provided to you during onboarding, is required to deploy your cluster instance.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While there is, indeed, an underlying cluster identity in zero, this is implementation detail and we do not directly expose it anywhere.

Currently, in the UI we only talk about Cluster Token.

image
Suggested change
When you create an account in Pomerium Zero, a new **Cluster Token** is generated and assigned to your personal account. This cluster token, which is provided to you during onboarding, is required to deploy your cluster instance.
When you create a cluster in Pomerium Zero, a **Cluster Token** is generated that allows your Pomerium instance to connect to the Pomerium Zero.


You can generate a new cluster token at any time. See the [**Rotate cluster identity**](#rotate-cluster-identity) steps below for more information.

#### Rotate cluster identity
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While cluster identity in fact exists, this is implementation detail that is never exposed to the end user directly. I suggest we only mention Cluster Token, as this is the only thing end users see.

Suggested change
#### Rotate cluster identity
#### Rotate cluster token


A cluster token does not have a set expiration time. However, you may want to rotate the cluster identity in the Zero Console for security reasons. For example:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
A cluster token does not have a set expiration time. However, you may want to rotate the cluster identity in the Zero Console for security reasons. For example:
A cluster token does not have a set expiration time. However, you may want to rotate the cluster token in the Zero Console for security reasons. For example:


- A malicious insider could use the token to view the cluster's configuration, which may contain sensitive data
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- A malicious insider could use the token to view the cluster's configuration, which may contain sensitive data
- A cluster token secret was accidentally exposed, or

- You may lose track of the existing token, and want a new one

:::caution

Rotating the cluster identity will invalidate the existing cluster token.

:::

To rotate your cluster identity in the Zero Console:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
To rotate your cluster identity in the Zero Console:
To rotate your cluster token in the Zero Console:


1. From the navigation bar dropdown, select **Manage Clusters**
1. Under **Actions**, select the **edit** icon
1. Select the **Domains** tab
1. In the **Cluster Identity** field, select **Rotate Identity**
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the described UI does not exist. it is currently in the Manage > Settings > Advanced and is called *Rotate Token

image

1. Copy the token value and store it somewhere safe ![Rotating a cluster identity in the Zero Console](./img/clusters/pz-rotate-cluster-identity.gif)

After rotating the cluster identity, you must pass it into your configuration and run Pomerium. See the steps below for your deployment environment.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
After rotating the cluster identity, you must pass it into your configuration and run Pomerium. See the steps below for your deployment environment.
After rotating the cluster token, you must pass it into your configuration and run Pomerium. See the steps below for your deployment environment.


<Tabs>
<TabItem value="linux" label="Linux">

In the shell script below, replace `<cluster_token>` with your new cluster token before running the command:

```bash
curl https://console.pomerium.app/install.bash | env POMERIUM_ZERO_TOKEN=<cluster_token> bash -s install
```

</TabItem>
<TabItem value="docker" label="Docker">

1. In your `docker-compose.yaml` file, replace the value of the `POMERIUM_ZERO_TOKEN` environment variable with the new cluster token value:

```yaml title="docker-compose.yaml"
services:
pomerium:
image: pomerium/pomerium:v0.25.1
ports:
- 80:80
- 443:443
restart: always
environment:
// highlight-start
POMERIUM_ZERO_TOKEN: <CLUSTER_TOKEN>
// highlight-end
XDG_CACHE_HOME: /var/cache
AUTOCERT_DIR: /var/cache/autocert
volumes:
- pomerium-cache:/var/cache

volumes:
pomerium-cache:
```

1. Run `docker compose up -d`

</TabItem>
<TabItem value="kubernetes" label="Kubernetes">
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still need to confirm these steps are accurate for K8s.


1. Replace the value of `pomerium_zero_token` with your new cluster token:
```yaml
apiVersion: v1
kind: Secret
metadata:
name: pomerium
namespace: pomerium-zero
type: Opaque
stringData:
pomerium_zero_token: <cluster_token>
```
1. Apply the manifest to your Kubernetes cluster
```bash
kubectl apply -f ./secret.yaml
```

</TabItem>
</Tabs>

### Cluster domain

Pomerium Zero generates and assigns a unique **Cluster Domain** to your cluster. A cluster domain contains a randomly generated subdomain and the `pomerium.app` domain.

It follows this format: `<CLUSTER-SUBDOMAIN-XXXX>.pomerium.app`

For example: `voracious-ape-1578.pomerium.app`

#### Cluster name

The **Cluster Name** is a customizable identifier for your cluster. It defaults to the randomly generated subdomain of your cluster domain, but you can change it at any time. Changing the cluster name does not affect your cluster domain.

If you want to change the cluster name, you can update it in your cluster settings:

1. From the navigation bar dropdown, select **Manage Clusters**
1. Under **Actions**, select the **edit** icon
1. In the **Cluster Name** field, enter your preferred cluster name
1. Save your changes and apply the changeset

![Viewing the new cluster name in the Zero Console](./img/clusters/cluster-name-table.png)

#### Detected and Override IP Address

Whenever you start a cluster, it must fetch its configuration from the Pomerium Zero control plane. During this process, Pomerium attempts to detect the cluster's outbound IP address to connect to it.

In the Zero Console, the cluster's IP address is referred to as the **Detected IP Address**. Depending on your environment, the detected IP address may not be reachable by you, the end-user. This could be the case if, for example, you're running a cluster:

- Locally from your laptop behind a NAT-enabled router
- Inside a corporate intranet
- Behind a firewall
- In a Kubernetes server where the ingress load balancer IP address doesn't match the egress IP address

In such cases, you may see a `DNS_PROBE_FINISHED_NXDOMAIN` error in your browser when you access a route. As a workaround, we've provided the **Override IP Address** field, which allows you to manually set the IP address so that Pomerium Zero can connect to your cluster.

![Manually setting the cluster IP address in the Zero Console](./img/clusters/cluster-ip-address-settings.png)

### Cluster settings

Each cluster is assigned its own **Cluster settings** object, meaning the available settings within a cluster apply only to that cluster instance. This means changes applied to one cluster instance won't affect another cluster deployed with the same token.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Each cluster is assigned its own **Cluster settings** object, meaning the available settings within a cluster apply only to that cluster instance. This means changes applied to one cluster instance won't affect another cluster deployed with the same token.
Each cluster is assigned its own **Cluster settings** object, meaning the available settings within a cluster apply only to that cluster instance. This means changes applied to one cluster instance won't affect another cluster deployed with the same token.

this is incorrect. all clusters deployed with the same token share all the configuration (settings, routes, certs, etc).


### Routes and Policies

**Routes** and **Policies** defined in a cluster are scoped only to that cluster, and are not available in other cluster instances.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
**Routes** and **Policies** defined in a cluster are scoped only to that cluster, and are not available in other cluster instances.
**Routes** and **Policies** defined in a cluster are scoped only to that cluster, and are not available in other clusters.


:::info

To learn more about routing and policies in Pomerium, see the following docs:

- [**Routing**](/docs/capabilities/routing)
- [**Policy Language**](/docs/capabilities/ppl)

:::

### Wildcard certificates

Pomerium Zero issues **Wildcard Certificates** generated by ZeroSSL for each cluster. You can view the **Cert Details** of a certificate in the **Certificates** settings dashboard:

![The Cluster Cert window in the Zero Console](./img/certificates/cluster-cert-details.png)

:::info

See [**Certificates**](/docs/concepts/certificates) to learn more about how certificates work in Pomerium.

:::
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@
"noout",
"NOR",
"nosniff",
"NXDOMAIN",
"ocsp",
"oidc",
"onelogin",
Expand Down
Loading