install jdk in ubuntu 16
sudo apt-get install openjdk-8-jdk
sudo apt-get install openjdk-8-source #this is optional, the jdk source code
apt-cache search jdk
add below to ~/.bash_profile
export JAVA_HOME=/usr/lib/jvm/java-8-openjdk
export PATH=$PATH:/usr/lib/jvm/java-8-openjdk/bin
then logout and login.
xargs 命令
[root@node-00 ~]# kubectl get pods -n kube-system|grep OutOfcpu
apacheds-slave-v47q6-1877407820-vg8sv 0/1 OutOfcpu 0 8d
container-log-bcgfl-525005328-fj3l7 0/1 OutOfcpu 0 8d
dashboard-j2qpf-2583856500-0pnp4 0/1 OutOfcpu 0 8d
dashboard-j2qpf-2583856500-14dff 0/1 OutOfcpu 0 8d
dashboard-j2qpf-2583856500-3b2xc 0/1 OutOfcpu 0 8d
dashboard-j2qpf-2583856500-3r8w8 0/1 OutOfcpu 0 8d
dashboard-j2qpf-2583856500-4rpj5 0/1 OutOfcpu 0 8d
dashboard-j2qpf-2583856500-6n8n7 0/1 OutOfcpu 0 8d
dashboard-j2qpf-2583856500-6wx54 0/1 OutOfcpu 0 8d
dashboard-j2qpf-2583856500-86fj2 0/1 OutOfcpu 0 8d
dashboard-j2qpf-2583856500-ccvwl 0/1 OutOfcpu 0 8d
dashboard-j2qpf-2583856500-dzts3 0/1 OutOfcpu 0 8d
dashboard-j2qpf-2583856500-g9npt 0/1 OutOfcpu 0 8d
dashboard-j2qpf-2583856500-gf11b 0/1 OutOfcpu 0 8d
dashboard-j2qpf-2583856500-k9r0n 0/1 OutOfcpu 0 8d
dashboard-j2qpf-2583856500-lg56d 0/1 OutOfcpu 0 8d
dashboard-j2qpf-2583856500-lmzrv 0/1 OutOfcpu 0 8d
dashboard-j2qpf-2583856500-lzvrn 0/1 OutOfcpu 0 8d
dashboard-j2qpf-2583856500-nsw99 0/1 OutOfcpu 0 8d
dashboard-j2qpf-2583856500-s64kl 0/1 OutOfcpu 0 8d
dashboard-j2qpf-2583856500-t4t4t 0/1 OutOfcpu 0 8d
dashboard-j2qpf-2583856500-tkz0s 0/1 OutOfcpu 0 8d
guardian-server-v47q6-3333958911-sws8d 0/1 OutOfcpu 0 8d
kube-metrics-87xvt-1260086222-44msn 0/1 OutOfcpu 0 8d
tdh-license-x9459-4290184508-8d439 0/1 OutOfcpu 0 8d
terminal-nl5wd-871168735-3m54t 0/1 OutOfcpu 0 8d
## kill 一行命令所有这些pods
kubectl get pods -n kube-system|grep OutOfcpu|awk '{print $1}'|xargs kubectl delete pods {} -n kube-system
xargs是一个高效有用的shell 命令.