Create SSH key using ssh-keygen on linux terminal to access (ssh) the Compute
instances (worker/bastion) in OCI.
ssh-keygen -t rsa -N "" -b 2048 -C demokey -f id_rsa
Within your tenancy, there must be a compartment to contain the necessary network resources (VCN, subnets, internet gateway, route table, security lists).
Create Compartment button.Create Compartment button.Developer Services and click Kubernetes Clusters (OKE).

Create Cluster to create the new network resources and the new cluster.

Node Pools on Resources and then View to view the Node Pool and worker node status
Kubernetes Node Condition is Ready.
Access Cluster on the Cluster WCCOKEPHASE1 page.
Setup a bastion node for accessing internal resources.
We will create the bastion node in same VCN following below steps, so that we can ssh into worker nodes.
Here we will choose CIDR Block: 10.0.22.0/24 . You can choose a different block, if you want.
Click on the VCN Name from the Cluster Page as shown below
Next Click on Security List and then Create Security List
Create a bastion-private-sec-list security with below Ingress and Egress Rules.
Ingress Rules:
Egress Rules:
Create a bastion-public-sec-list security with below Ingress and Egress Rules.
Ingress Rules:
Egress Rules:
Create the bastion-route-table with Internet Gateway, so that we can add to bastion instance for internet access
Next create a Regional Public Subnet for bastion instance with name bastion-subnet with below details:
Next Click on the Private Subnet which has Worker Nodes
And then add the bastion-private-sec-list to Worker Private Subnet, so that bastion instance can access the Worker nodes
Next Create Compute Instance oke-bastion with below details

Once bastion Instance BastionHost is created, get the Public IP to ssh into the bastion instance
Login to bastion host as below
ssh -i <your_ssh_bastion.key> opc@123.456.xxx.xxx
bash -c "$(curl -L https://raw.githubusercontent.com/oracle/oci-cli/master/scripts/install/install.sh)"
$ oci setup config
$ oci setup config
This command provides a walkthrough of creating a valid CLI config file.
The following links explain where to find the information required by this
script:
User API Signing Key, OCID and Tenancy OCID:
https://docs.cloud.oracle.com/Content/API/Concepts/apisigningkey.htm#Other
Region:
https://docs.cloud.oracle.com/Content/General/Concepts/regions.htm
General config documentation:
https://docs.cloud.oracle.com/Content/API/Concepts/sdkconfig.htm
Enter a location for your config [/home/opc/.oci/config]:
Enter a user OCID: ocid1.user.oc1..aaaaaaaao3qji52eu4ulgqvg3k4yf7xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Enter a tenancy OCID: ocid1.tenancy.oc1..aaaaaaaaf33wodv3uhljnn5etiuafoxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Enter a region (e.g. ap-hyderabad-1, ap-melbourne-1, ap-mumbai-1, ap-osaka-1, ap-seoul-1, ap-sydney-1, ap-tokyo-1, ca-montreal-1, ca-toronto-1, eu-amsterdam-1, eu-frankfurt-1, eu-zurich-1, me-jeddah-1, sa-saopaulo-1, uk-gov-london-1, uk-london-1, us-ashburn-1, us-gov-ashburn-1, us-gov-chicago-1, us-gov-phoenix-1, us-langley-1, us-luke-1, us-phoenix-1): us-phoenix-1
Do you want to generate a new API Signing RSA key pair? (If you decline you will be asked to supply the path to an existing key.) [Y/n]: Y
Enter a directory for your keys to be created [/home/opc/.oci]:
Enter a name for your key [oci_api_key]:
Public key written to: /home/opc/.oci/oci_api_key_public.pem
Enter a passphrase for your private key (empty for no passphrase):
Private key written to: /home/opc/.oci/oci_api_key.pem
Fingerprint: 74:d2:f2:db:62:a9:c4:bd:9b:4f:6c:d8:31:1d:a1:d8
Config written to /home/opc/.oci/config
If you haven't already uploaded your API Signing public key through the
console, follow the instructions on the page linked below in the section
'How to upload the public key':
https://docs.cloud.oracle.com/Content/API/Concepts/apisigningkey.htm#How2
User Settings, which is in the drop down under your OCI userprofile, located at the top-right corner of the page.
Api Keys link, located near bottom-left corner of the page and then Click the Add API Key button. Copy the content of oci_api_key_public.pem and Click Add.

Access Cluster on the Cluster WCCOKEPHASE1 page
Local Access.
$ oci -v
$ mkdir -p $HOME/.kube
$ oci ce cluster create-kubeconfig --cluster-id ocid1.cluster.oc1.phx.aaaaaaaaae4xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxrqgjtd
--file $HOME/.kube/config --region us-phoenix-1 --token-version 2.0.0
$ export KUBECONFIG=$HOME/.kube/config
$ curl -LO https://dl.k8s.io/release/v1.15.7/bin/linux/amd64/kubectl
$ sudo mv kubectl /bin/
$ sudo chmod +x /bin/kubectl
$ kubectl get nodes
NAME STATUS ROLES AGE VERSION
10.0.10.197 Ready node 14d v1.23.4
10.0.10.206 Ready node 14d v1.23.4
10.0.10.50 Ready node 14d v1.23.4
$ wget https://get.helm.sh/helm-v3.5.4-linux-amd64.tar.gz
$ tar -zxvf helm-v3.5.4-linux-amd64.tar.gz
$ sudo mv linux-amd64/helm /bin/helm
$ helm version
version.BuildInfo{Version:"v3.5.4", GitCommit:"1b5edb69df3d3a08df77c9902dc17af864ff05d1", GitTreeState:"clean", GoVersion:"go1.15.11"}
sudo yum install git -y