This demo shows two workloads communicating over Ghostunnel authenticated with SVIDs.
One workload, a simple bulletin board, is running as a Kubernetes service and is attested by the spire-agent against the state known by the local kubelet.
The other workload is a database running in its own VM outside of the Kubernetes cluster, attested by its PID.
Within the Kubernetes cluster, the spire-agent and spire-server are deployed as ordinary, non-privileged, processes on the master and nodes.
Both Ghostunnel processes are managed by the SPIRE Sidecar, which implements calls out to the Workload API, writing of certificates to the filesystem, and signaling Ghostunnel when a new certificate is available.
The blog will be available at http://10.90.0.10:30080/
Prerequisites:
- Vagrant
- Virtualbox
- GNU screen >=4.06 on the host machine (optional, for split-screen demo)
The following steps can be accomplished with make build
:
- Create the database VM
- Deploy spire-agent
- Build ghostunnel
- Create the kubernetes cluster
- Deploy spire-agent to the Kubernetes Node VM
- Deploy spire-server to the Kubernetes Master VM
- Create and register the application containers
- Shut down the Vagrant VMs (
make halt
)
(step 1-2 can be accomplished with make harness
)
- Start the Kubernetes and Database VMs
- Run the harness container to set up SSH connections to the Kubernetes node and master and the database VM
- Inject the registration config into spire-server
- Generate two join tokens on the Kubernetes master with spire-server
- On the Kubernetes node, launch spire-agent with one join token
- On the Database VM, launch spire-agent with the other join token
- Deploy the application service to the Kubernetes cluster
- SPIRE is installed from a release tgz, update the URL
install_spire.sh
- sidecar is also installed from a release tgz, update
blog/container_ghostunnel/Dockerfile
- ghostunnel is built from a branch in the spiffe org, update
install_ghostunnel.sh
make destroy
will halt and wipe all existing VMs
The provision scripts can be manually re-run from within the VMs at any time. They will clean up and re-install all SPIRE and demo related configuration.
make reprovision
will reprovision all VMs