2022年3月25日 星期五

How to trigger a kubenetes schedule job manually

kubectl create job --from=cronjob/[cronjob name] [new job] -n [namespace]
sometimes you may encounter the error such as
"error: unknown object type *v1beta1.CronJob"
it was caused by the kubectl is different version. you can download the old one to resolve issue

$ kubectl version
Client Version: version.Info{Major:"1", Minor:"23", GitVersion:"v1.23.5", GitCommit:"c285e781331a3785a7f436042c65c5641ce8a9e9", GitTreeState:"clean", BuildDate:"2022-03-16T15:58:47Z", GoVersion:"go1.17.8", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"19", GitVersion:"v1.19.15", GitCommit:"0f9140665765825f8a4187cefd055e4b350b4a36", GitTreeState:"clean", BuildDate:"2021-09-17T23:04:02Z", GoVersion:"go1.15.15", Compiler:"gc", Platform:"linux/amd64"}
WARNING: version difference between client (1.23) and server (1.19) exceeds the supported minor version skew of +/-1

for me, my kubectl client is v1.23.5, but server is older version wiht v1.19.15, therefor I downgraded to the older one to resolve the issue
curl -LO https://dl.k8s.io/release/v1.19.15/bin/linux/amd64/kubectl

沒有留言:

Obsidian 插件介紹:Text Generator

Text Generator 是 Obsidian 的一個插件,它可以根據給定的提示自動生成文本。這個插件使用 GPT-3 語言模型,能夠產生類似人類的文本,非常適合編寫故事、文章、電子郵件和其他類型文本。 主要功能: **生成文本:**根據提示生成各種長度的...