spiffe-csi/example
Nick Stott d74bcebf45 fix: update from go vsn 1.24.0 to 1.24.6 (#262)
Signed-off-by: Nick Stott <nick.stott@enterprisedb.com>
2025-08-18 11:22:35 -06:00
..
config Upgrade golang to 1.22.2 and update changelog (#181) 2024-04-10 13:15:52 -03:00
workload fix: update from go vsn 1.24.0 to 1.24.6 (#262) 2025-08-18 11:22:35 -06:00
README.md Fill out example 2021-11-23 11:50:28 -07:00
build-and-load-workload-image.sh Fill out example 2021-11-23 11:50:28 -07:00
deploy-spire-and-csi-driver.sh Create spire namespace before deploying csi (#83) 2023-02-13 19:05:57 -07:00
register-workload.sh Fill out example 2021-11-23 11:50:28 -07:00

README.md

SPIFFE CSI Driver Example

This example demonstrates how to deploy the SPIFFE CSI Driver into a Kubernetes cluster and how to consume the Workload API Unix Domain Socket it provides from a SPIFFE-aware workload.

Prerequisites

Steps

  1. Start a Kubernetes cluster via Kind:

    $ kind create cluster
    
  2. Build the example workload image and load it into Kind:

    $ ./build-and-load-workload-image.sh
    
  3. Deploy SPIRE and the SPIFFE CSI Driver (which resides in the same DaemonSet as the SPIRE Agent):

    $ ./deploy-spire-and-csi-driver.sh
    
  4. Register the example workload with SPIRE Server:

    $ ./register-workload.sh
    
  5. Deploy the workload:

    $ kubectl apply -f config/workload.yaml
    
  6. Check the workload logs to see the update received over the Workload API:

    $ kubectl logs pod/example-workload
    

    You should see something like:

    2021/11/23 18:46:33 Update:
    2021/11/23 18:46:33   SVIDs:
    2021/11/23 18:46:33     spiffe://example.org/workload
    2021/11/23 18:46:33   Bundles:
    2021/11/23 18:46:33     example.org (1 authorities)
    
  7. Delete the Kubernetes cluster:

    $ kind delete cluster