Warning
This content has been generated by machine translation. The translations are automated and have not undergone human review or validation.
1.3.1 Connecting to a Cluster with Cloud Shell
Cloud Shell
[Cloud Shell] (https://docs.oracle.com/en-us/iaas/Content/API/Concepts/cloudshellintro.htm) is a web browser-based Linux terminal provided by Oracle Cloud Console as described in the official documentation. no see. You can understand that it runs as a small virtual machine, and it provides pre-authenticated OCI CLI for users who access the Oracle Cloud console, and provides additional cli and settings by default.
It is provided by default as kubectl, the Kubernetes CLI, for connecting to the OKE cluster.
It is free to use, and comes with authentication and basic tools, so you can use it right out of the box.
Connect to OKE cluster with Cloud Shell
Go to the details page of the OKE cluster you created.
Click Access Cluster.
Choose Cloud Shell Access from the two approaches.
- Cloud Shell: Access through Cloud Shell provided by OCI. Basic settings and related clis for the currently connected user to work with the current OCI Tenacy environment are configured.
- Local Access: This is a method that starts with the tasks required to access the local PC for the first time.
Step #1. Launch Cloud Shell
Click Launch Cloud Shell or click the link in the upper right corner to access Cloud Shell.
If you run the following command in the connected environment, you can see that oci cli is installed and connection is possible.
oci -v oci os get ns
Step #2. Creating a kubeconfig file
Execute the contents of the second step of Access Your Cluster in Cloud Shell to create kubeconfig for connecting to the created OKE cluster.
- As shown in the command, in Cloud Shell, Kubernetes API can be accessed only when a public endpoint is provided.
Check OKE Cluster Connection
If you run
kubectl cluster-info
, you can check that you are connected to the cluster through the kubeconfig created.
As an individual, this article was written with my personal time. There may be errors in the content of the article, and the opinions in the article are personal opinions.