Add Admin User
akshay.csr
akshay.key
[CertificateSigningRequest]
https://kubernetes.io/docs/reference/access-authn-authz/certificate-signing-requests/
https://kubernetes.io/docs/tasks/tls/managing-tls-in-a-cluster/
akshay.csr | base64
cat <<EOF >>test.yaml
apiVersion: certificates.k8s.io/v1beta1
kind: CertificateSigningRequest
metadata:
name: akshay
spec:
groups:
- system:authemticated
request: $(cat akshay.csr | base64 | tr -d '\n')
usages:
- digital signature
- key encipherment
- server auth
EOF
kubectl get csr
kubectl certificate --help
kubectl certificate approve akshay
kubectl get csr {csr} -o yaml
spec:
groups:
- system:masters
- system:authenticated
usages:
- digital signature
- key encipherment
- server auth
username: agent-x
kubectl certificate deny --help
kubectl certificate deny agent-smith
kubectl delete csr agent-smith