- Create an instance of VPC Gen2
- Create IKS on VPC Infrastructure
- Install the IBM Cloud CLI and plug-ins
- Install Kubernetes CLI
- Gain access to your cluster
Create a Virtual Private Cloud (VPC) on generation 2 compute with a subnet that is located in the zone where you want to create the cluster. Make sure to attach a public gateway to your subnet so that you can access public endpoints from your cluster.
Create a standard VPC Generation 2 compute cluster by using the IBM Cloud console. For more detailed information, please refer here.
Once VPC is created, you need to edit the default security group to allow incoming network traffic from the VPC load balancers. Follow the steps given here for opening security group ports via console. After editing, the Default Security Group of your VPC will show Inbound rules as shown in snapshot below.
Follow the instructions given here and create an IKS instance on VPC. For this pattern, we have created IKS which has worker pool (2vCPU and 4GB RAM) with three worker nodes. Once created, wait for some time (~40 minutes) for the cluster to get ready.
It includes the installation of these CLIs and plug-ins:
- IBM Cloud CLI (ibmcloud)
- IBM Cloud Kubernetes Service plug-in (ibmcloud ks)
- IBM Cloud Container Registry plug-in (ibmcloud cr)
Refer to the link to install these.
To work with your cluster, you need to install the Kubernetes CLI. Please refer this link.
Go to IBM Cloud dashboard and navigate to your Kubernetes cluster. Click on the
Access tab as shown below.
Perform the steps given in
Verify the environment using the following command.
kubectl config current-context
It should return the details of the cluster that you are planning to work with.