Skip to content

Instantly share code, notes, and snippets.

@pwright
Last active August 1, 2023 15:42
Show Gist options
  • Save pwright/c62df040eca5813614ffa6b1fd2949b7 to your computer and use it in GitHub Desktop.
Save pwright/c62df040eca5813614ffa6b1fd2949b7 to your computer and use it in GitHub Desktop.

User:

create a diagram showing how skupper links are created between a site with a token and a site with ingress. After establishing the link you can expose services from either site and consume any exposed service from the other site.

ChatGPT:

Sure, let's start by breaking down what we are trying to visualize:

Two sites: one with a token and another with ingress. The creation of Skupper links between these two sites. Once the link is established, services can be exposed from either site. Any exposed service can be consumed by the other site. In this context, a "site" could refer to a Kubernetes namespace on a single cluster or namespaces on different clusters.

Here is how I visualize it in a diagram:

+-------------+                          +-------------+
|             |    1. Create Skupper     |             |
|  Site A     |<------------------------>|   Site B    |
| (with token)|         Link             | (with ingress)|
|             |                          |             |
+------+------+                          +-----+-------+
|             |                          |             |
| Expose      |                          | Expose      |
| Services    |                          | Services    |
|             |                          |             |
+------+------+                          +-----+-------+
|             |                          |             |
| Consume     |                          | Consume     |
| Services    |                          | Services    |
|             |                          |             |
+-------------+                          +-------------+

Site A (with a token) and Site B (with ingress) create a Skupper link between them. Both Site A and Site B can expose their own services. Once the services are exposed, Site A can consume services from Site B and vice versa. Please note, this is a simplified representation and actual process might involve more steps and complexities depending on the configuration of the sites and the nature of the services being exposed and consumed.

User: add another site

ChatGPT: Certainly, let's add another site to the diagram. Let's call it Site C and assume it also has a token.

+-------------+                          +-------------+                         +-------------+
|             |    1. Create Skupper     |             |     1. Create Skupper   |             |
|  Site A     |<------------------------>|   Site B    |<----------------------- |   Site C    |
| (with token)|         Link             | (with ingress)|         Link            | (with token)|
|             |                          |             |                         |             |
+------+------+                          +-----+-------+                         +------+------+ 
|             |                          |             |                         |             |
| Expose      |                          | Expose      |                         | Expose      |
| Services    |                          | Services    |                         | Services    |
|             |                          |             |                         |             |
+------+------+                          +-----+-------+                         +------+------+
|             |                          |             |                         |             |
| Consume     |                          | Consume     |                         | Consume     |
| Services    |                          | Services    |                         | Services    |
|             |                          |             |                         |             |
+-------------+                          +-------------+                         +-------------+

Site A (with a token) and Site B (with ingress) create a Skupper link between them. Site B (with ingress) and Site C (with a token) also create a Skupper link between them. All three sites can expose their own services. Once the services are exposed, each site can consume services from any other site. Please note, the direction of the arrows in the diagram represent the direction of the link creation, not the direction of service consumption. The service consumption can happen in any direction once the links are established and services are exposed.

User: explain skupper ingress, why is it necessary and how does it help in link creation?

ChatGPT: Skupper is a tool that enables secure communication across Kubernetes clusters with no VPNs or special firewall rules. It's designed to work with unmodified applications and without any need for special coding.

Ingress in Kubernetes is an API object that manages external access to the services in a cluster, typically HTTP. Ingress can provide load balancing, SSL termination and name-based virtual hosting.

When using Skupper, the term "ingress" has a slightly different meaning, it refers to the network access point to the Skupper router network that is created within the Kubernetes cluster.

The Skupper router network is a network overlay that allows for direct communication between pods in different clusters. The Skupper network ingress is the entry point into this overlay network.

When a Skupper link is created between two sites, it is essentially creating a secure communication channel between the network ingress of two different Skupper router networks.

The ingress site is the one that initially receives the connection request from the site with the token. The token contains necessary information for the site with the token to connect to the ingress site. This token is created by the ingress site and can be used by other sites to establish a link.

Thus, in a Skupper multi-cluster setup, the ingress is necessary because it:

  • Acts as the entry point for other sites to connect to the overlay network.
  • Provides the necessary information for other sites to establish the link.
  • Once the link is established, it can route the traffic to the appropriate services within its cluster.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment