lens
lens copied to clipboard
Failed Connect Oracle OCI OKE from Lens Desktop Windows
Good afternoon, I'm trying to connect my Oracle OKE Kubernetes Cluster on Lens, but I get the following error message:
Note: My kubectl is working normally.
If you fully quit lens from the tray icon and start lens from the powershell does that resolve this issue?
Hello, same error
Hello @haddan-rocha,
The issue here is that .kube/config that is set by OCI CLI run oci command to obtain a short-lived token every time kubectl command is ran.
When you set up the kubeconfig file for a cluster, by default it contains an Oracle Cloud Infrastructure CLI command to generate a short-lived, cluster-scoped, user-specific authentication token. The authentication token generated by the CLI command is appropriate to authenticate individual users accessing the cluster using kubectl and the Kubernetes Dashboard. From OCI documentation.
Therefore, we must create a service account that will bind our defined user in .kube/config to use it.
You can simply follow the following documentation from OCI page. https://docs.oracle.com/en-us/iaas/Content/ContEng/Tasks/contengaddingserviceaccttoken.htm#Adding_a_Service_Account_Authentication_Token_to_a_Kubeconfig_File
Good luck
Hello @HassanOumar
I did what was asked and it solved my problem. Thanks.