How to discover the IBM cloud k8s cluster.   


Discover the IBM cluster with SWIFT

  • First, we need to login to the SWIFT dashboard and navigate to the ‘container cluster’ menu and click on Add button.


   2. Once you click on the Add button you will appear a screen below and select the ‘cloud type’ from the dropdown menu. 



 

  3. Now you have to fill the IBM k8s cluster details to discover the IKS cluster in SWIFT.  See Snippet below for your reference.


 


a. Friendly name: You need to enter a friendly name according to your cluster or project.

b. Cloud Type: Choose the cloud type from the dropdown as SWIFT supports various K8S clouds. 

c. Cluster Name: Put the IKS cluster name . We have provided our IKS cluster for eg.

d. API Key: Provide the API key of your IBM Cloud.

e. TRAIPOD Config: This is an optional input. They can be configured for each sync, and the values input for the sync will override the defaults set for the cluster. For more info you can look TRAIPOD KB article.  

f. Cluster private IP config: Normally, the IP address or hostname mentioned in the kubeconfig file is used to discover the cluster. However, if you want to set up a private IP or hostname to access the cluster, and the public IP mentioned in the kubeconfig is not used, this setting can be used to overwrite the default kubeconfig IP with the private IP and port.   



4. Once You click on Add button , the IBM cluster will be discovered within 2-3 seconds.




  • As you can see on above snippet, It will see K8S version, Platform, API server, port information.
  • In the Actions tab, there are three option you will get as below.
    • Rediscover: If you click on the Re-discover option, the cluster will be rediscovered, applying the latest changes. You will then be able to see the updates reflected in SWIFT. 
    • Configure Cluster: If you need to change the API key, update a different image registry, or modify the cluster’s private IP, you can do so using this option. 
    • Delete Cluster: If you want to delete the cluster, then you can do from this option.



5. If you expand the cluster by clicking on cluster name. Then you will see the lot of information about discovered the cluster.




   a. As you can see on above snippet you will see lot of information like, Friendly name, Cluster name, K8S version, IBM cluster name, IBM region etc.


6. If you click on Namespace tab, you will see all the namespaces present in the cluster. Please check below snippet for reference.



7. To view all Kubernetes objects, click on the "Kubernetes Objects" tab. The objects will be displayed namespace-wise

   

If you want to see the pods of a specific namespace:

  1. Select "Pod" as the object type in the "Object Type" tab.

  2. Choose the desired namespace in the "Namespace" tab.


For example, in the snippet below, we have selected "Pod" as the object type and "wordpress-app" as the namespace. This displays all pods within that namespace. Similarly, you can view other objects available in a specific namespace.




   a. On the above snippet there are two pods are running in wordpress-app namespace.