Currently, the crc-cluster-status.sh script logs into OpenShift using the kubeadmin account, which writes authentication tokens to the default kubeconfig file at /opt/kubeconfig. This results in kubeadmin token entries adding to the system:admin kubeconfig file, where the tokens eventually expire and may cause authentication or usability issues for system administrators.
Proposal:
- Use
--kubeconfig=/tmp/kubeconfig as a flag during oc login with the kubeadmin user.
- This ensures the kubeadmin token is isolated in a temporary file, separate from the permanent system:admin kubeconfig in
/opt/kubeconfig.
- Prevents unnecessary token entries in the main kubeconfig and avoids future token expiration issues for system administrators who depend on
/opt/kubeconfig as their main system:admin configuration.
This change improves token management and prevents accidental pollution or issues with privileged kubeconfig files.
Currently, the
crc-cluster-status.shscript logs into OpenShift using the kubeadmin account, which writes authentication tokens to the default kubeconfig file at/opt/kubeconfig. This results in kubeadmin token entries adding to the system:admin kubeconfig file, where the tokens eventually expire and may cause authentication or usability issues for system administrators.Proposal:
--kubeconfig=/tmp/kubeconfigas a flag duringoc loginwith the kubeadmin user./opt/kubeconfig./opt/kubeconfigas their main system:admin configuration.This change improves token management and prevents accidental pollution or issues with privileged kubeconfig files.