Kubectl Plugin
You can simply download the binary from the releases page. Currently
linux
,darwin
(OS X),windows
withx86_64
andarm64
are provided. If you are using some other systems or architectures, you have to download the source code and executemake build
to build the binary.Extract and move it to system PATH.
- Then you can use it with
kubectl-kruise
orkubectl kruise
.
$ kubectl-kruise --help
$ kubectl kruise --help
Usage
scale
Set a new size for a Deployment, ReplicaSet, CloneSet, or Advanced StatefulSet.
$ kubectl kruise scale --replicas=3 cloneset nginx
It equals to kubectl scale --replicas=3 cloneset nginx
.
set
Available commands: , image
, resources
, selector
, serviceaccount
, subject
.
$ kubectl kruise set env cloneset/nginx STORAGE_DIR=/local
$ kubectl kruise set image cloneset/nginx busybox=busybox nginx=nginx:1.9.1
Currently it supports migrate from Deployment to CloneSet.
scaledown
# Scale down 2 with selective pods
It will decrease replicas=replicas-2 of this cloneset and delete the specified pods.