📞📱☎️📡🌐 Cloud Native Telecom Initiative (CNTI) Test Catalog is a tool to check for and provide feedback on the use of K8s + cloud native best practices in networking applications and platforms
Improving the method ensure_kubeconfig!, the method itself checks all possible issues with KUBECONFIG. However, there is 1 case when the test passes, but the k8s cluster is not up and running.
Case occurs when KUBECONFIG is set successfully, indicating that the path to config file exists, but the file itself is empty or contains some faults, resulting k8s cluster is not running.
Suggestion
Develop another method that executes the following command: kubectl config view --kubeconfig=path/to/config and checks the exit code.
If the exit code is 0, the cluster is up and running. If the exit code is anything other than 0, there is an error with the cluster.
Benefits
Simply checking the KUBECONFIG is not sufficient to verify the health of the cluster.
Description
ensure_kubeconfig!
, the method itself checks all possible issues with KUBECONFIG. However, there is 1 case when the test passes, but the k8s cluster is not up and running.Suggestion
kubectl config view --kubeconfig=path/to/config
and checks the exit code.Benefits