MicroK8s.Kubectl

Hi,

I’ve set up a MicroK8s cluster but when i try to add it to Octopus it fails;

NotSpecified: Could not find kubectl. Make sure kubectl is on the PATH. See https://g.octopushq.com/KubernetesTarget for more information.

On the commandline I have to use MicroK8s.Kubectl as they prefixed the name to prevent conflicts with a standard K8s install.

What am I missing or what’s the fix as I’ve found quite a few references to others using MicroK8s successfully but no help to resolve my issue.

Ok so I found in KubectlPowershellContext.ps1

$Kubectl_Exe=$OctopusParameters[“Octopus.Action.Kubernetes.CustomKubectlExecutable”]

Anyone have a pointer as to how I could set

“Octopus.Action.Kubernetes.CustomKubectlExecutable”

outside of any process I’ve defined?

So… got there. Doc’s aren’t the clearest but;

  1. The KubeCtl missing was on the server, not the target. I didn’t want k8s on the server so…
  2. Create an SSH worker on the target
  3. Set the K8s cluster target to use the worker and on port 16443

Cookin’ with gas.

I’m glad to hear you’re up and running.

While we regularly use minikube for local testing, I must admit I haven’t played with MicroK8s.

If there’s anything we can assist with, or you have any feedback, please don’t hesitate to reach out :slight_smile:

Tbh i’m new to K8s but it’s been as refreshing a new toy as Octopus was when i first played with it many moons ago. Keep up the good work; hopefully there’s loads of testing in the K8s space to improve feature set… not that i’ve found anything missing yet. Early doors.

Thx, will do.

1 Like