You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Assign an external IP to your spire-server-bundle-endpoint service on each cluster.
144
146
145
-
SPIFFE (*Secure Production Identity Framework For Everyone*) is a specification for implementing identity for workloads, and SPIRE is the code that implements this specification in practice. A SPIFFE bundle is a resource that contains the public key material needed to authenticate credentials from a particular trust domain. A SPIFFE bundle endpoint is a resource (represented by a URL) that serves a copy of a SPIFFE bundle for a trust domain. SPIFFE control planes may both expose and consume these endpoints to transfer bundles between themselves, thereby achieving federation. We use the SPIRE server to host the “spire-server-bundle-endpoint” service that serves the SPIFFE bundle to an external Spire agent of a different trust domain.
147
+
SPIFFE (*Secure Production Identity Framework For Everyone*) is a specification for implementing identity for workloads, and SPIRE is the code that implements this specification in practice. A SPIFFE bundle is a resource that contains the public key material needed to authenticate credentials from a particular trust domain. A SPIFFE bundle endpoint is a resource (represented by a URL) that serves a copy of a SPIFFE bundle for a trust domain. SPIFFE control planes may both expose and consume these endpoints to transfer bundles between themselves, thereby achieving federation. The SPIRE server is used to host the “spire-server-bundle-endpoint” service that serves the SPIFFE bundle to an external Spire agent of a different trust domain.
146
148
147
-
We use MetalLB to assign the IP for this service. MetalLB hooks into your Kubernetes cluster and provides a network load-balancer implementation. In short, it allows you to create Kubernetes services of type LoadBalancer in clusters that don’t run on a cloud provider, and thus cannot simply hook into paid products to provide load balancers.
149
+
MetalLB is used to assign the IP for this service. MetalLB hooks into your Kubernetes cluster and provides a network load-balancer implementation. In short, it allows you to create Kubernetes services of type LoadBalancer in clusters that don’t run on a cloud provider, and thus cannot simply hook into paid products to provide load balancers.
148
150
149
151
Follow this [link](https://metallb.universe.tf/configuration/_advanced_ipaddresspool_configuration/#controlling-automatic-address-allocation) to set up an automatic address allocation for all services that have type external IP.
150
152
151
-
Ours looks something like this:
153
+
The configuration should now look something like this:
Doing a cat command of the bundles reveals the keys to be copied into the trust domain bundle field.
203
205
204
-
After the Bundle endpoint URL and the TrustDomainBundle fields are configured and applied, check the status of the spire pods to make sure they are running and check the logs of the spire-server to verify successful federation.
206
+
After the Bundle endpoint URL and the TrustDomainBundle fields are configured and applied, check the status of the SPIRE pods to make sure they are running and check the logs of the spire-server to verify successful federation.
Now that SPIRE is federated and communication across clusters can be facilitated, let us deploy a sample application that verifies this functionality.
222
+
Now that SPIRE is federated and communication across clusters can be facilitated, here's how you can deploy a sample application that verifies this functionality.
221
223
222
224
## 4.1 Deploy a resource in Cluster-1
223
225
224
-
In Cluster 1, apply a new ClusterSpiffeID called federated that registers resources with the label **spiffe.io/spire-managed-identity=curl-greeter** that can be federated with cluster2. Create a resource called curl-greeter that has the label: **spiffe.io/spire-managed-identity=curl-greeter** and annotation: **inject.istio.io/templates=sidecar, spire**
226
+
In Cluster 1, apply a new ClusterSpiffeID called ***federated*** that registers resources with the label **spiffe.io/spire-managed-identity=curl-greeter** that can be federated with cluster2. Create a resource called ***curl-greeter*** that has the label: **spiffe.io/spire-managed-identity=curl-greeter** and annotation: **inject.istio.io/templates=sidecar, spire**
## 4.2 Deploy Bookinfo Sample Application in Cluster-2
231
233
232
-
In Cluster 2, apply a new ClusterSpiffeID called federated that registers resources with the label **spiffe.io/spire-managed-identity=spire** that can be federated with cluster1. Apply the bookinfo sample application manifest.
234
+
In Cluster 2, apply a new ClusterSpiffeID called ***federated*** that registers resources with the label **spiffe.io/spire-managed-identity=spire** that can be federated with cluster1. Apply the bookinfo sample application manifest.
*Note: Copy the ca cert under the cluster1.demo section into a new file bookinfo.ca.cert.*
304
308
305
-
Apply the gateway configuration for the bookinfo application found here: (It uses the istio-ingress gateway)
309
+
Apply the gateway configuration for the bookinfo application found [here](https://github.com/cxteamtrials/caas-trials-content/blob/main/services/istio/release-1.17/samples/bookinfo-gateway.yaml): (It uses the istio-ingress gateway)
*Note: Copy the ca cert under the cluster2.demo section into a new file bookinfo.ca.cert.*
432
436
433
-
## 4.7 Visualize using Service Mesh:
437
+
## 4.7 Visualize using Service Mesh
434
438
435
-
Using the Kiali dashboard, observing the graphs of generated traffic.
439
+
Using the Kiali dashboard, observe the graphs of generated traffic.
436
440
437
441
The graph below shows services communication, and the locks symbolize mTls protocol.
438
442
439
443

440
444
441
-
The goal of this blog was to guide you through federating SPIRE across two Kubernetes clusters deployed on HPE GreenLake for Private Cloud Enterpriseby creating a cluster federated trust domain and federated ClusterSpiffeIDs for your sample application workloads as well as to help you visualize your service mesh through Kiali Dashboard.
445
+
The goal of this blog post was to guide you through federating SPIRE across two Kubernetes clusters deployed on HPE GreenLake for Private Cloud Enterprise. It shows you how to do this by creating a cluster federated trust domain and federated ClusterSpiffeIDs for your sample application workloads and **then helps**you visualize your service mesh through Kiali Dashboard
0 commit comments