-
Notifications
You must be signed in to change notification settings - Fork 487
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Spire deployment on kubernetes and certificate retrieval #4957
Comments
you can list attested agent using spire-server agent list:
To see if SVIDs are propagated you will need to rely on logs:
or metrics another option is to use debug endpoint but you can rely on metrics or logs to see SVID propagation.
there is an know issue that prevents to use k8s attestor for inside agent it self, you may rely on using unix attestor if you want to attest agent as a workload
As you mentioned we are not including sh or another commands, because we are using scratch images that contains only our binaries, you will need to use
But is your workload able to fetch SVIDs using go-spiffe? or you want to have a product to fetch SVIDs and store that on disk?
In K8s you can use spiffe-csi, to inject spire-agent socket, you can see this example
You can take a look to go-spiffe examples to see how to use your SVIDs. |
Thank you for your answer !
I get the error : Shouldn't I be able to verify the issuance of the SVIDs of my workloads with this command ?
|
what attestor are you using? unfortunately there is an known issue where you can't attest agent (as a workload) using k8s attestor, if you want to attest your agent as a workload you will need to use another attestor (like unix attestor)
Nop, your workload must attest successfully to verify SVID issuance, so, your workload must be the one calling,
Yes, you have java-spiffe and py-spiffe too, if you need another language, |
@ConstantRohmer could you figure it out? |
Hi @MarcosDY, I would like to thank you for your help and follow up on this subject, which was really appreciated ! I won't be able to continue working on this subject since it was a school project and we reached the end of the deadlines. However, it is possible that another group of students will resume from where we stopped and all the information you gave will probably point them in the right direction. See you on another subject one day maybe ;) |
Sounds good. We'll close for now. |
I did not found any other forum about spire so sorry if this is not the right place for this...
I am currently trying to deploy spire on my k8s cluster (3 worker nodes). My objective is to successfully deploy spire and use the certificates generated by the spire-server to encrypt the exchanges between 2 pods : a webclient and a webserver.
I followed the official tutorial https://spiffe.io/docs/latest/try/getting-started-k8s/
but have encountered some issues without being able to find the answers in the docs :
Although the spire-server is running fine, I am struggling to understand if the spire-agents deployed on each of the k8s nodes are working. The pods are
Running 1/1
, but I don't know how to get the SVIDs and therefore verify if everything works well (e.g if the spire-agents are registered by the server)I deployed my 2 test pods (webclient and webserver) and added registration entries on the spire-server to select the tags
client
andwebserver
of my 2 pods and to register them on spire with the following entries :From the tutorial, I know something like below should help me verify that these pods have been issued a SVID and certificate :
However, the only way I managed to execute this command was by installing spire binaries on the client and webserver directly which seems odd because I already have agents running. In fact, I can't open a shell in the spire-agents because spire changed their images to be minimal and it doesn't include /bin/sh or anything (from what I've seen).
Do you know a way to check for SVID issuance without installing spire on the workloads or is it the right way ?
Following this idea, I tried to build my own spire-agent pods by adding the following commands in the yml to install spire on an alpine pod and therefore be able to connect to the spire-agent pods and debug from there :
Although I put the same path for the socket
agent.sock
and mounted it to the pods, it is sometimes not found by the pods, how should I work with this socket ?Once everything will work as expected (I hope so at least ;) ), how should I retrieve the certificates issued by my workloads ? Are they even available from these pods so I could be able to create an https session for example ?
Thanks for anything you can add or correct in what I've done, any help is really appreciated !
The text was updated successfully, but these errors were encountered: