* Update spire-identity-exchange for 0.4.0 Signed-off-by: Kevin Fox <[email protected]> * Understand the plugin config Signed-off-by: Kevin Fox <[email protected]> * Fix test Signed-off-by: Kevin Fox <[email protected]> * Update ip Signed-off-by: Kevin Fox <[email protected]> * Update name Signed-off-by: Kevin Fox <[email protected]> * Update name Signed-off-by: Kevin Fox <[email protected]> * Update name Signed-off-by: Kevin Fox <[email protected]> * Fix broken socket path Signed-off-by: Kevin Fox <[email protected]> * Nope, it was right before Signed-off-by: Kevin Fox <[email protected]> * Try disabling the spiffe plugin for now Signed-off-by: Kevin Fox <[email protected]> * Try logging more Signed-off-by: Kevin Fox <[email protected]> * Map non container behavior Signed-off-by: Kevin Fox <[email protected]> * Map non container behavior Signed-off-by: Kevin Fox <[email protected]> * Map non container behavior Signed-off-by: Kevin Fox <[email protected]> * Map non container behavior Signed-off-by: Kevin Fox <[email protected]> * Map non container behavior Signed-off-by: Kevin Fox <[email protected]> * Map non container behavior Signed-off-by: Kevin Fox <[email protected]> * Map non container behavior Signed-off-by: Kevin Fox <[email protected]> * Add missing csi driver settings Signed-off-by: Kevin Fox <[email protected]> * Test Signed-off-by: Kevin Fox <[email protected]> * Test Signed-off-by: Kevin Fox <[email protected]> * Fix Signed-off-by: Kevin Fox <[email protected]> * Use local oidc discovery provider path by default Signed-off-by: Kevin Fox <[email protected]> * Enable spire-identity-exchange in shared infrastructure Signed-off-by: Kevin Fox <[email protected]> * Update timeout Signed-off-by: Kevin Fox <[email protected]> * Update timeout Signed-off-by: Kevin Fox <[email protected]> * Test config Signed-off-by: Kevin Fox <[email protected]> * Test config Signed-off-by: Kevin Fox <[email protected]> * Test config Signed-off-by: Kevin Fox <[email protected]> * Test config Signed-off-by: Kevin Fox <[email protected]> * Fix Signed-off-by: Kevin Fox <[email protected]> * Fix Signed-off-by: Kevin Fox <[email protected]> * Bump spire-ha-agent version to fix issue Signed-off-by: Kevin Fox <[email protected]> * Fix Signed-off-by: Kevin Fox <[email protected]> * Fix Signed-off-by: Kevin Fox <[email protected]> * Bump version Signed-off-by: Kevin Fox <[email protected]> * Update version bits to match what it should be, minus final bump Signed-off-by: Kevin Fox <[email protected]> --------- Signed-off-by: Kevin Fox <[email protected]> Signed-off-by: kfox1111 <[email protected]> Co-authored-by: Faisal Memon <[email protected]>
Kubernetes Bottom Turtle HA Setup
In this setup, a bottom turtle HA setup based on spire-ha-agent and then Kubernetes based access is built from the ground up.
What does this mean?
The bottom turtle: There is a pair of spire servers deployed. Trust is established between the two servers creating an HA Trust Domain without needing any 3rd party trust sources.
A spire-ha-agent, a spire-agent@a and a spire-agent@b is run on the k8s hosts. This provides a bottom turtle trust source between the services on the os Kubernetes runs on.
Host services can then use this trust chain to secure communications such as:
- kubelet -> kube-apiserver
- sshd
- log shipper -> centeralized log processor
- os level metrics
- etc
We will not discuss how to do that here, but need to utilize this base to establish trust inside of Kubernetes.
We will bridge os to Kubernetes cluster with some configuration on the host, and deploying the helm charts to utilize and export new services on top.
What do we need to do?
There are two different kinds of services that need permission bridging.
- SPIRE Servers
- Downstream agents
Root Servers
Setup a pair of HA root servers as described here: https://github.com/spiffe/bootc/tree/main/demo
K8s SPIRE Servers
In the following diagram, we see all the parts involved from getting the K8s SPIRE Servers running on the control plane nodes.

We need to be able to use the hosts workload attestors to attest the SPIRE Servers running inside Kubernetes.
To do so, we will define a workload on the root spire servers, and inject it into the spire servers inside Kubernetes.
Example workload definition:
apiVersion: spire.spiffe.io/v1alpha1
kind: ClusterStaticEntry
metadata:
name: node1-k8s-spire-server
spec:
parentID: spiffe://${SPIFFE_TRUST_DOMAIN}/node/node1.${SPIFFE_TRUST_DOMAIN}
spiffeID: spiffe://${SPIFFE_TRUST_DOMAIN}/k8s-spire-server/server-${SUBINSTANCE}
downstream: true
selectors:
- systemd:id:spiffe-socat-unix@k8s-spire-server-${SUBINSTANCE}.service
federatesWith:
- spire-ha
And on the host, we install spiffe-socat-unix via packages, and then enable the bridges:
Any process that can access the unix socket will be able to become a spire downstream server. Treat this socket with great care.
Consider only doing this on your control plane nodes, and restricting the spire-server to only run on the control plane nodes for extra isolation.
Downstream agents
In the following diagram we show how a worker node is aranged.

We need to be able to use the hosts workload attestors to attest the SPIRE Agents running inside Kubernetes.
To do so, we will define a workload on the root spire servers, and inject it into the spire agents inside Kubernetes.
Example workload definition:
apiVersion: spire.spiffe.io/v1alpha1
kind: ClusterStaticEntry
metadata:
name: node1-k8s-spire-agent
spec:
parentID: spiffe://${SPIFFE_TRUST_DOMAIN}/node/node1.${SPIFFE_TRUST_DOMAIN}
spiffeID: spiffe://${SPIFFE_TRUST_DOMAIN}/spire-exchange/node1.${SPIFFE_TRUST_DOMAIN}
selectors:
- systemd:id:spiffe-socat-unix@k8s-spire-agent-${SUBINSTANCE}.service
And on the host, we install spiffe-socat-unix via packages, and then enable the bridges:
Install the charts:
We need to install 4 charts.
- spire crds
- side A
- side B
- the common infrasctructure
This allows upgrading Side A or Side B completely independencly from each other, ensuring if there is a problem it will not affect production.
Setup the spire-values.yaml as needed.
# Install the common components
helm upgrade --install --create-namespace --namespace spire-mgmt --values "spire-values.yaml" \
spire oci://ghcr.io/spiffe/helm-charts/spire-nested \
--set tags.haAgentCommon=true \
--set "global.spire.namespaces.create=true" \
--set "global.spire.ingressControllerType=ingress-nginx" \
--set "spiffe-oidc-discovery-provider.ingress.enabled=true"
# Install server side a
helm upgrade --install --namespace spire-mgmt --values "spire-values.yaml" \
--wait spire-a oci://ghcr.io/spiffe/helm-charts/spire-nested \
--set tags.bottomTurtleHAA=true \
--set "global.spire.ingressControllerType=ingress-nginx"
# Install server side b
helm upgrade --install --namespace spire-mgmt --values "spire-values.yaml" \
--wait spire-b oci://ghcr.io/spiffe/helm-charts/spire-nested \
--set tags.bottomTurtleHAB=true \
--set "global.spire.ingressControllerType=ingress-nginx"
