Martin Koníček

Blog

MicroK8s git fetch kustomize error

Showcase image

This is a simple workaround when you get a git fetch error when trying deploy kustomize on MicroK8s

Error

kubectl kustomize "github.com/kubernetes-sigs/gateway-api/config/crd/experimental?ref=444631bfe06f3bcca5d0eadf1857eac1d369421d" | kubectl apply -f -
error: git cmd = '/snap/microk8s/6572/usr/bin/git fetch --depth=1 origin 444631bfe06f3bcca5d0eadf1857eac1d369421d': exit status 128

Solution

 sudo mount --bind -o nodev,ro /usr/bin /snap/microk8s/current/usr/bin

Resolution

$ sudo mount --bind -o nodev,ro /usr/bin /snap/microk8s/current/usr/bin
$ kubectl kustomize "github.com/kubernetes-sigs/gateway-api/config/crd/experimental?ref=444631bfe06f3bcca5d0eadf1857eac1d369421d" | kubectl apply -f -
customresourcedefinition.apiextensions.k8s.io/gatewayclasses.gateway.networking.k8s.io configured
customresourcedefinition.apiextensions.k8s.io/gateways.gateway.networking.k8s.io configured
customresourcedefinition.apiextensions.k8s.io/grpcroutes.gateway.networking.k8s.io configured
customresourcedefinition.apiextensions.k8s.io/httproutes.gateway.networking.k8s.io configured
customresourcedefinition.apiextensions.k8s.io/referencegrants.gateway.networking.k8s.io configured
customresourcedefinition.apiextensions.k8s.io/tcproutes.gateway.networking.k8s.io configured
customresourcedefinition.apiextensions.k8s.io/tlsroutes.gateway.networking.k8s.io configured
customresourcedefinition.apiextensions.k8s.io/udproutes.gateway.networking.k8s.io configured

This is regarding wrong version of git related to bug https://github.com/canonical/microk8s/issues/4202

  • SSH in Visual Studio Code with KeePass
    SSH in Visual Studio Code with KeePassRemote SSH extension in Visual Studio Code allows you directly edit files on Linux machine and access Linux console from your Windows workstation. For best comfort when you are accessing Remote SSH server from Visual Studio Code use KeePasswith KeeAgent which will works as SSH agent.
  • cs | en