需求测试
k create ns drliu;k delete -f config/crd/bases/;
ka config/crd/bases/;ka sample/operatorTest/;
k delete -f sample/operatorTest/;dos2unix sample/cleancr.sh;sh sample/cleancr.sh drliu;go run cmd/cluster-controller/main.go --namespace="drliu";ka config/samples/gdb_v2alpha2_gdbcluster_single_apply.yamlwatch -n 1 "kubectl get po -n drliu"watch -n 1 "kubectl get gl -n drliu -o yaml|grep -A 30 histTask"
watch -n 1 "kubectl get gzl -n drliu -o yaml|grep -A 30 current"
watch -n 1 "kubectl get gcl -n drliu -o yaml|grep -A 30 current"
watch -n 1 "kubectl get gdl -n drliu -o yaml|grep -A 30 current"watch -n 1 "kubectl get gl.drliu.drliu -n drliu -o yaml|grep -A 30 histTask"
watch -n 1 "kubectl get gzl.drliu.drliu -n drliu -o yaml|grep -A 30 current"
watch -n 1 "kubectl get gcl.drliu.drliu -n drliu -o yaml|grep -A 30 current"
watch -n 1 "kubectl get gdl.drliu.drliu -n drliu -o yaml|grep -A 30 current"watch -n 1 "kubectl get gdl.drliu.drliu -n drliu -o yaml|grep -A 30 current"
容器环境清理
容器
docker ps -a|grep 'Exited'|grep -v grep|awk -F ' ' '{print $1}'|xargs docker rm
docker ps -a|grep drliudocker ps -a|grep 'drliu'|grep -v grep|awk -F ' ' '{print $1}'|xargs docker stop;
docker ps -a|grep 'drliu'|grep -v grep|awk -F ' ' '{print $1}'|xargs docker rm
镜像
docker images|grep 'none'|grep -v grep|awk -F ' ' '{print $3}'|xargs docker rmi -fdocker images|head -n 30
docker images|grep '61309_snapshot_563'|grep -v grep|awk -F ' ' '{print $3}'|xargs docker rmi -fdocker images|grep 61309_T8_092
查看链路
netstat -anlp | grep 进程号/端口号
- 挂载 iso 用于远程访问
mkdir /var/www/html/source
mount -o /var/www/html/source iso
挂载硬盘
fdisk -l
mkdir -p /home/data
mount /dev/sdb /home/data
ps -ef|grep 'python onekey'|grep -v grep|awk -F ' ' '{print $2}'|xargs kill -9
ps -ef|grep 'install_control'|grep -v grep|awk -F ' ' '{print $2}'|xargs kill -9
ps -ef|grep 'issue_con'|grep -v grep|awk -F ' ' '{print $2}'|xargs kill -9
ps -ef|grep 'docker_install_all'|grep -v grep|awk -F ' ' '{print $2}'|xargs kill -9
ps -ef |grep issue|awk '{print $2 " " $3" "$5" "$9}'
lsof -i:6012|grep -v PID|awk -F ' ' '{print $2}'|xargs -r kill -9
ssh-keygen -m PEM -t rsa 生成rsa密钥;ssh-copy-id 指定ip
iptables -I INPUT -s 10.229.13.67 -j DROP
解封: iptables -D INPUT -s 10.229.13.67 -j DROP
iptables -I INPUT -s 10.56.114.85 -j DROP(43.184)
java -jar ommtool.jar -k
zxin10#$%^&*(XE@5678123456655665
java -jar ommtool.jar -256e 'zxin10#$%^&*(XE@5678123456655665' '11:'
3Uz+UFfaGNczemeMrrIbTw==
java -jar ommtool.jar -256d 'zxin10#$%^&*(XE@5678123456655665' 5/TuOW4y+Wumt3l4mawNzA==
11:
/etc/hosts 填写 10.30.1.105 time.zte.com.cn
执行命令 ntpdate time.zte.com.cn
iptables -t nat -A PREROUTING -d 10.229.12.243/32 -p tcp --dport 23584 -j DNAT --to-destination 192.168.1.235:8443
6338
ls /proc/6338/fd | wc -l
lsof -p|wc -l
挂载持久卷
mkdir -p /var/www/html/source
mount -o loop /home/iso/Kylin-Server-10-SP2-x86-Release-Build09-20210524.iso /var/www/html/source