openkruise / kruise-tools Goto Github PK
View Code? Open in Web Editor NEWTools to use with the Kruise libraries
License: Apache License 2.0
Tools to use with the Kruise libraries
License: Apache License 2.0
The cloneset has finished updating, but kubectl-kruise rollout status can't exit
kubectl-kruise version
Client Version: version.Info{Major:"1", Minor:"0", GitVersion:"v1.0.4", GitCommit:"e1b55f7d11d906edf31a80ba695bc8857b881b75", GitTreeState:"clean", BuildDate:"2022-07-22T11:51:37Z", GoVersion:"go1.16.15", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"22+", GitVersion:"v1.22.3-aliyun.1", GitCommit:"937757761d3c1db7080f179102b437c26c521ecd", GitTreeState:"clean", BuildDate:"2022-05-26T12:38:52Z", GoVersion:"go1.16.9", Compiler:"gc", Platform:"linux/amd64"}
WARNING: version difference between client (1.0) and server (1.22) exceeds the supported minor version skew of +/-1
kubectl-kruise rollout status cloneset/app-web
Waiting for partitioned roll out to finish: 2 out of 2 new pods have been updated... // Waiting
kubectl get po
app-web-8zqxn 1/1 Running 2 (60m ago) 4d
app-web-wrxhx 1/1 Running 0 60m
kubectl kruise create ContainerRecreateRequest --pod my-pod --containers app,sidecar -n pod-namespace
According kubectl reference , kubectl support create pdb. So that kubectl kruise
can support create pub, like
kubectl kruise create podunavailablebudget my-pub --selector=app=rails --min-available=1
We should also allow users to install Kruise using Homebrew.
brew install kruise
Reference openkruise/kruise#964
In order to improve the experience, we suggest that expose the service like kubectl expose -h
[root@k8s-1 cloneset]# kubectl get cloneset
NAME DESIRED UPDATED UPDATED_READY READY TOTAL AGE
cloneset 4 4 4 4 4 12m
[root@k8s-1 cloneset]# kubectl expose cloneset cloneset --port=80 --target-port=8000
error: no kind "CloneSet" is registered for version "apps.kruise.io/v1alpha1" in scheme "k8s.io/kubectl/pkg/scheme/scheme.go:28"
[root@k8s-1 cloneset]# kubectl expose cloneset cloneset --port=80 --target-port=8000
error: no kind "CloneSet" is registered for version "apps.kruise.io/v1alpha1" in scheme "k8s.io/kubectl/pkg/scheme/scheme.go:28"
[root@k8s-1 cloneset]# kubectl expose -h | grep cloneset
[root@k8s-1 cloneset]#
The 'kruise rollout undo' subcommand cannot roll back multiple batches that are currently being executed.
Get an error: you cannot rollback a paused deployment.
we can leverage this ->https://github.com/sonatype-nexus-community/nancy as an github workflow to scan vulnerability.
Currently kubectl get rollout only display exposed rollout status as columns, however it is vital to display the status of all involved objects as well, e.g. pods, traffic routings objects. So kruise-tools can provide a deep inspection command, in the form of kubectl kruise describe rollout ns/name
, and provide the following information:
In addition, the new describe command should support a watch option, to dynamically update the output during the rollout.
One can use the Argo kubectl plugin as a reference
Add cmd to support selective Pod deletion.
Reference openkruise/kruise#943
Support transform native k8s workload in helm charts to kruise workload, such as kubectl kruise trans -f -t cloneset
Run: kubectl krew install kruise
Installing plugin: kruise
W0810 10:46:13.929533 5127 install.go:164] failed to install plugin "kruise": install failed: failed to unpack into staging dir: failed to unpack the plugin archive: failed to obtain plugin archive: failed to download "https://github.com/openkruise/kruise-tools/releases/download/v1.0.5/kubectl-kruise-linux-amd64.tar.gz": Get "https://github.com/openkruise/kruise-tools/releases/download/v1.0.5/kubectl-kruise-linux-amd64.tar.gz": unexpected EOF
failed to install some plugins: [kruise]: install failed: failed to unpack into staging dir: failed to unpack the plugin archive: failed to obtain plugin archive: failed to download "https://github.com/openkruise/kruise-tools/releases/download/v1.0.5/kubectl-kruise-linux-amd64.tar.gz": Get "https://github.com/openkruise/kruise-tools/releases/download/v1.0.5/kubectl-kruise-linux-amd64.tar.gz": unexpected EOF
当我通过set image替换镜像时不会触发原地升级,diff 一下更换镜像前后两个controllerrevision 对象中的 data 结构发现,执行了set image之后的版本丢失resource、port等配置,从而触发重建升级
❯ kubectl-kruise rollout approve rollout/http-server-test
error: no kind "Rollout" is registered for version "rollouts.kruise.io/v1alpha1" in scheme "pkg/runtime/scheme.go:100"
❯ kubectl-kruise version
Client Version: version.Info{Major:"1", Minor:"1", GitVersion:"v1.1.2", GitCommit:"519472cf18392bdf3cc8d0b510a0e2d855e72b52", GitTreeState:"clean", BuildDate:"2024-02-04T15:13:44Z", GoVersion:"go1.18.10", Compiler:"gc", Platform:"darwin/arm64"}
Kustomize Version: v4.5.4
Server Version: version.Info{Major:"1", Minor:"24+", GitVersion:"v1.24.6-aliyun.1", GitCommit:"3de3c43202bdfdf6826fb879bf0f82d09d6a5ade", GitTreeState:"clean", BuildDate:"2023-11-20T09:17:25Z", GoVersion:"go1.18.6", Compiler:"gc", Platform:"linux/amd64"}
❯ kubectl api-resources | grep roll
batchreleases rollouts.kruise.io/v1alpha1 true BatchRelease
rollouthistories rollouts.kruise.io/v1alpha1 true RolloutHistory
rollouts rollouts.kruise.io/v1alpha1 true Rollout
trafficroutings rollouts.kruise.io/v1alpha1 true TrafficRouting
now kruise-tools only implement restarting ReCreate type cloneset, like deployment.
InPlaceOnly/InPlaceIfPossible is needed too.
kruise rollout undo子命令不能回滚正在执行的多批次rollout,error: you cannot rollback a paused deployment
kruise-rollout-0.5.0
kruise-tools v1.1.0
What would you like to be added:
Support kubectl-kruise top cloneset [cloneset name] so that we can see the resource usage of each cloneset.
Why is this needed:
We often want to have an idea of the resource usage of each cloneset, not only individual pods or nodes.
The metrics server might not allow a direct query of this info, but kubectl performing a local summation of the resource usage of all pods in a cloneset may be worthy.
kubectl kruise set image cloneset/words-app words-app-image='registry-vpc.cn-shanghai.aliyuncs.com/xxx-backend/words-service:2022-04-07_76' -n kube-eyododo --record
error: failed to patch image update to pod template: admission webhook "vcloneset.kb.io" denied the request: spec: Forbidden: only allowed to update images in spec for InPlaceOnly, but found remove /containers/0/env
error: no kind "Rollout" is registered for version "rollouts.kruise.io/v1beta1" in scheme "pkg/runtime/scheme.go:100"
kruise-rollout-0.5.0
kruise-tools v1.1.0
I get an auth error
$ kubectl-kruise rollout history cloneset plat-demo-28aebeb-20220119030940-test
error: no Auth Provider found for name "oidc"
Such as kubectl expose deployment nginx --port=80 --target-port=8000
, kurise plugin support this cmd for CloneSet, AdvancedStatefulSet.
Reference kubectl docs: https://kubernetes.io/docs/reference/generated/kubectl/kubectl-commands#expose
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.