Skip to content

Latest commit

 

History

History
 
 

cluster1

Spire

This is a part of the Spire setup that installs Spire to the first cluster in a multi-cluster scenarios.

This example assumes interdomain or multi-cluster scenario. If your cluster setup differs from these scenarios you may need to adjust spire configs (rename trust domains, change URLS, etc.).

Run

Check that we have config for the cluster:

[[ ! -z $KUBECONFIG1 ]]

Apply spire deployments:

kubectl --kubeconfig=$KUBECONFIG1 apply -k https://github.com/networkservicemesh/deployments-k8s/examples/spire/cluster1?ref=c9dc6831a1647494d4dc2581a362ed21a42685f9

Wait for PODs status ready:

kubectl --kubeconfig=$KUBECONFIG1 wait -n spire --timeout=1m --for=condition=ready pod -l app=spire-server
kubectl --kubeconfig=$KUBECONFIG1 wait -n spire --timeout=1m --for=condition=ready pod -l app=spire-agent

Apply the ClusterSPIFFEID CR for the cluster:

kubectl --kubeconfig=$KUBECONFIG1 apply -f https://raw.githubusercontent.com/networkservicemesh/deployments-k8s/c9dc6831a1647494d4dc2581a362ed21a42685f9/examples/spire/cluster1/clusterspiffeid-template.yaml

Cleanup

Delete ns:

kubectl --kubeconfig=$KUBECONFIG1 delete crd clusterspiffeids.spire.spiffe.io
kubectl --kubeconfig=$KUBECONFIG1 delete crd clusterfederatedtrustdomains.spire.spiffe.io
kubectl --kubeconfig=$KUBECONFIG1 delete validatingwebhookconfiguration.admissionregistration.k8s.io/spire-controller-manager-webhook
kubectl --kubeconfig=$KUBECONFIG1 delete ns spire