openshiftredhatminishift

How to use CDK/minishift OpenShift cluster with kubectl


I have installed CDK on my Windows 10 laptop. I am following documentation on using IBM Blockchain Platform with RedHat OpenShift. One of the first steps is issuing kubectl commands.

I see CDK comes with the OpenShift CLI (oc) installed but not with kubectl. Do I need to install kubectl separatelly ? If so, how do I configure kubectl to know about my OpenShift cluster running in CDK/minishift?


Solution

  • To answer your specific question, any time you see a "kubectl" command you can replace it with "oc".

    You can also download kubectl directly from upstream, and it will use the same (by default, or use $KUBECONFIG to override) ~/.kube/config file.

    However, you should know that CDK is based on OpenShift 3.11.z and is approaching end-of-life. I would suggest you take a look at CRC, which is based on 4.x. Start here for more information -- https://console.redhat.com/openshift/create/local