Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kubernetes kind 'Job' not recognized #1203

Closed
ghost opened this issue May 18, 2020 · 7 comments · Fixed by #1206
Closed

kubernetes kind 'Job' not recognized #1203

ghost opened this issue May 18, 2020 · 7 comments · Fixed by #1206

Comments

@ghost
Copy link

ghost commented May 18, 2020

Error: no kind "Job" is registered for version "batch/v1" in scheme "k8s.io/kubernetes/pkg/api/legacyscheme/scheme.go:30"

tried to change it to v1 but still , kind 'Job' not recognized .

any help is welcomed

@ktsakalozos
Copy link
Member

Hi @mavenir-labs could you offer a minimal yaml manifest so I can reproduce this? Googling this error pointed me to a helm issue. Are you doing a helm based deployment?

@ghost
Copy link
Author

ghost commented May 19, 2020

Hi,
the problem occurs when I delete a Failed helm deployment of longhorn (https://longhorn.io/docs/0.8.0/install/install-with-helm/) .

root@microk8s:~# helm ls
NAME REVISION UPDATED STATUS CHART APP VERSION NAMESPACE
longhorn 1 Mon May 18 15:18:19 2020 FAILED longhorn-0.8.1 v0.8.1 longhorn-system

root@microk8s:~# helm delete --purge longhorn
Error: no kind "Job" is registered for version "batch/v1" in scheme "k8s.io/kubernetes/pkg/api/legacyscheme/scheme.go:30"

I can see that the job is there despite the error

root@microk8s:~# kubectl get jobs -A
NAMESPACE NAME COMPLETIONS DURATION AGE
longhorn-system longhorn-uninstall 1/1 4s 7s

This behavior does not occur on a 'generic' 1.18 kubernetes .

Thanks

@ktsakalozos
Copy link
Member

Are you using the helm binary packaged with MicroK8s (microk8s enable helm)?

We may want to upgrade helm as indicated in helm/helm#6894 (comment)

@ghost
Copy link
Author

ghost commented May 19, 2020

yes , + tiller
kubectl create serviceaccount --namespace kube-system tiller
kubectl create clusterrolebinding tiller-cluster-rule --clusterrole=cluster-admin --serviceaccount=kube-system:tiller
helm init --client-only
helm init --service-account tiller --override spec.selector.matchLabels.'name'='tiller',spec.selector.matchLabels.'app'='helm' --output yaml | sed 's@apiVersion: extensions/v1beta1@apiVersion: apps/v1@' | microk8s.kubectl apply -f -

@ktsakalozos
Copy link
Member

@mavenir-labs I just updated helm to 2.16.7. The snap will be on edge within the day and should be on the latest/stable channel with the 1.18.3 release.

To install the edge channel sudo snap install microk8s --classic --channel=latest/edge.

Please reopen the issue if the problem persists.

@ghost
Copy link
Author

ghost commented Jun 8, 2020

Hi,
I have updated microk8s with the following command,
snap refresh microk8s --classic --channel=latest/edge
got response --> microk8s (edge) v1.18.3 from Canonical✓ refreshed

but still helm is not updated,
Client: &version.Version{SemVer:"v2.16.0", GitCommit:"e13bc94621d4ef666270cfbe734aaabf342a49bb", GitTreeState:"clean"}
Server: &version.Version{SemVer:"v2.16.0", GitCommit:"e13bc94621d4ef666270cfbe734aaabf342a49bb", GitTreeState:"clean"}

Do I need a clean install of microk8s to get helm updated ?

@ghost
Copy link
Author

ghost commented Jun 8, 2020

think I got it,
Just needed to re-init helm .

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant