上一页 1 2 3 4 5 6 7 ··· 9 下一页
摘要: 脚本形式 #!/bin/bash #查询索引 echo `curl -s -XGET http://172.21.91.64:9200/_cat/indices?v -w '\n'` #只保留30天内的日志索引(删除30天前一天的日志) retain_time=$(date -d "30 days 阅读全文
posted @ 2021-12-16 14:58 缺个好听的昵称 阅读(301) 评论(0) 推荐(0) 编辑
摘要: Linux部署 开源项目地址:https://github.com/filebrowser/filebrowser 依赖于docker-compose yum install -y epel-release yum install -y docker-compose 创建数据库文件,这个文件空内容即 阅读全文
posted @ 2021-12-12 23:48 缺个好听的昵称 阅读(1245) 评论(0) 推荐(0) 编辑
摘要: #!/bin/sh pods=`kubectl get pods -n prod |grep $1|awk '{print \$1}'` for pod in $pods do echo $pod; kubectl exec -it --tty -n prod $pod -- cat /sys/fs 阅读全文
posted @ 2021-11-29 09:57 缺个好听的昵称 阅读(151) 评论(0) 推荐(0) 编辑
摘要: # 每天0点执行这个脚本,用于切割nginx日志 for pod in $(kubectl get pods -n service-a | grep gateway | awk '{print $1}'); do kubectl exec -ti -n service-a $pod -- /bin/ 阅读全文
posted @ 2021-11-24 15:15 缺个好听的昵称 阅读(377) 评论(0) 推荐(0) 编辑
摘要: cat /app/nginx/conf/nginx.conf user www; worker_processes auto; events { worker_connections 65535; } http { include mime.types; default_type applicati 阅读全文
posted @ 2021-11-13 12:22 缺个好听的昵称 阅读(515) 评论(0) 推荐(0) 编辑
摘要: #!/bin/bash /bin/kubeadm alpha certs renew all cd cp /root/.kube/config /root/.kube/bak-config-$(date +%F) #备份原来的文件 /bin/\cp /etc/kubernetes/admin.con 阅读全文
posted @ 2021-10-09 10:20 缺个好听的昵称 阅读(247) 评论(0) 推荐(0) 编辑
摘要: cat start_k8s.sh #!/bin/bash for i in `cat /tmp/replicas.txt`;do kubectl scale deployment `echo $i | awk -F ":" '{print $2}'` -n `echo $i | awk -F ":" 阅读全文
posted @ 2021-09-30 16:52 缺个好听的昵称 阅读(47) 评论(0) 推荐(0) 编辑
摘要: linux下批量删除空文件(大小等于0的文件)的方 find . -name "*" -type f -size 0c | xargs -n 1 rm -f 用这个还可以删除指定大小的文件,只要修改对应的 -size 参数就行,例如: find . -name "*" -type f -size 1 阅读全文
posted @ 2021-08-08 14:08 缺个好听的昵称 阅读(626) 评论(0) 推荐(0) 编辑
摘要: kubectl create secret -n service-a docker-registry secret_name --docker-server=registry_name_url --docker-username=ci-user --docker-password=123456 -- 阅读全文
posted @ 2021-08-07 11:41 缺个好听的昵称 阅读(161) 评论(0) 推荐(0) 编辑
摘要: yum方式安装 yum install -y https://repo.ius.io/ius-release-el7.rpm https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm yum install redi 阅读全文
posted @ 2021-08-07 11:26 缺个好听的昵称 阅读(324) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 ··· 9 下一页