Does harness use kubectl tool to deploy kubernetes objects?

10/2/2021

As mentioned here:

Harness takes the artifacts and Kubernetes manifests you provide and deploys them to the target Kubernetes cluster. You can simply deploy Kubernetes objects via manifests and you can provide manifests using remote sources and Helm charts.

enter image description here


Is harness tool equipped with kubectl client tool to perform kubectl apply on kubernetes manifests?

-- overexchange
continuous-deployment
devops
kubernetes

1 Answer

10/4/2021

If you're curious about the implementation details of the specific tool that are not explained in its official documentation, you should study directly its source code to find the answer.

But answering your specific question:

Is harness tool equipped with kubectl client tool to perform kubectl apply on kubernetes manifest?

Well, it doesn't have to. Writing a tool which in its code uses a console kubectl client isn't very optimal and doesn't make much sense. For performing exactly the same actions that kubectl does, such tools use Client Libraries. As you can see in the official docs, there is large variety of them, some of them are officialy supported, others are community-maintained, but altogether they support various programming languages.

Of course, you can write an external tool which doesn't use client libraries but implements the API calls and request/response types on its own.

-- mario
Source: StackOverflow