Kubernetes v1 authentication resources provide mechanisms for verifying identities within the cluster. These include ServiceAccounts, TokenRequests, TokenReviews, and CertificateSigningRequests, forming a robust system for secure access control in Kubernetes clusters.
Authentication
Add API authentication details
Readme
User instructions for this resource
The CertificateSigningRequest (CSR) template is designed to create a request for a certificate in Kubernetes. It uses a combination of facets and variables to allow for flexible configurations.
Variables
: This global variable represents the identifier for the CSR, used to access specific fields in the request values.__CSR_ID__
Collection Breakdown
- Base
{
"kind": "CertificateSigningRequest",
"facets": ["master"],
"metadata": "{{ __CSR_ID__.metadata }}",
"apiVersion": "certificates.k8s.io/v1"
}
This section is always included (due to the master facet). It sets the kind, apiVersion, and metadata for the CSR resource.
- CSR Specification
{
"spec": {
"request": "{{ __CSR_ID__.spec.request }}",
"usages": "{{ __CSR_ID__.spec.usages }}"
},
"facets": ["addon:spec"]
}
This section defines the core specification for the CSR, including the base64-encoded certificate request and its intended usages.
- Signer Name
{
"spec": {
"signerName": "{{ __CSR_ID__.spec.signerName }}"
},
"facets": ["addon:spec", "addon:signername"]
}
- Status
{
"status": {
"conditions": "{{ __CSR_ID__.status.conditions }}"
},
"facets": ["addon:status"]
}
This section allows for the inclusion of status information, particularly the conditions of the CSR.
Examples
Check Request Body tab section to play around with interactive examples.
Install(
)Example
The Curl tab in the request section below provides the curl command for your resource.
curl -s -X POST "https://configfacets.com/apis/repos/kubernetes/authentication-resources/v1/resources/collections/certificatesigningrequest/exec?format=json" -H "X-CORRELATION-ID: 4b4af9c5-537c-7413-741a-c40aa7f53113" -H "X-APIKEY: a64ea1713093e02315eed8517c2674d8" -d '{"facets":["master","addon:spec"],"values":{"basic_csr":{"spec":{"usages":["digital signature","key encipherment","server auth"],"request":"<base64-encoded-CSR>"},"metadata":{"name":"example-csr"}}},"globalvars":{"__CSR_ID__":"basic_csr"}}' | kubectl apply -f -