摘要: 一、K8S常用命令: 查看pod: kubectl get pod -n名称空间 进入容器: kubectl exec -it pod名字 -n名称空间 bash 查看类命令: —— 获取节点和服务版本信息,并查看附加信息 kubectl get nodes -o wide —— 获取pod信息,默 阅读全文
posted @ 2025-11-22 23:35 小蓝莓 阅读(30) 评论(0) 推荐(0)
摘要: 1.客户端程序import socketdef main(): s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) server_ip = input("请输入要连接的服务器ip地址:") server_port = int(input("请输 阅读全文
posted @ 2025-11-22 18:12 小蓝莓 阅读(19) 评论(0) 推荐(0)
摘要: 安装es集群每台主机都执行创建普通用户[root@centos3 ~]# useradd -d /home/es -m es[root@centos3 ~]# passwd es更改用户 es 的密码 。新的 密码:重新输入新的 密码:passwd:所有的身份验证令牌已经成功更新。修改最大文件描述符 阅读全文
posted @ 2025-11-22 18:09 小蓝莓 阅读(9) 评论(0) 推荐(0)
摘要: !/bin/bash REMOTE_REPO="registrylibrary.com.cn/lamboegg" LOCAL_REPO="cr.registry.res.jcyccloud.com/jiaozuo" IMAGES=( "mrttd:202409271740-jiaozuo" "mrt 阅读全文
posted @ 2025-11-20 18:03 小蓝莓 阅读(9) 评论(0) 推荐(0)
摘要: kubectl apply -f ingress-nginx.yml 配置如下 apiVersion: v1 kind: Namespace metadata: name: ingress-nginx labels: app.kubernetes.io/name: ingress-nginx app 阅读全文
posted @ 2025-11-20 17:58 小蓝莓 阅读(11) 评论(0) 推荐(0)
摘要: !/bin/bash 设置日志目录 LOG_DIR="/db2/v6dbarchlog/db2inst3/V6DB/NODE0000/C0000003" 查找并删除超过两天的日志文件 find $LOG_DIR -type f -name "S*" -mtime +2 -exec rm -f {} 阅读全文
posted @ 2025-11-20 17:55 小蓝莓 阅读(6) 评论(0) 推荐(0)
摘要: !/bin/bash 主机列表:可以是 IP 地址或主机名 HOSTS=("10.64.1.35" "10.64.1.37" "10.64.1.38" "10.64.1.33" "10.64.1.39" "10.64.1.44" "10.64.1.34" "10.64.1.135") # 替换为你的 阅读全文
posted @ 2025-11-20 17:51 小蓝莓 阅读(10) 评论(0) 推荐(0)
摘要: 备份集群资源配置 kubectl get all --all-namespaces -o yaml > all-resources.yaml 备份 ConfigMap 和 Secret kubectl get configmap --all-namespaces -o yaml > configma 阅读全文
posted @ 2025-11-20 17:43 小蓝莓 阅读(3) 评论(0) 推荐(0)
摘要: 1.查看 Docker 默认存储位置 docker info | grep "Docker Root Dir" 2.修改 Docker 默认存储位置 systemctl stop docker vi /etc/docker/daemon.json { "data-root": "/mnt/docke 阅读全文
posted @ 2025-11-20 17:40 小蓝莓 阅读(9) 评论(0) 推荐(0)
摘要: 1:创建证书openssl req -x509 -nodes -days 36500 -newkey rsa:2048 -keyout tls.key -out tls.crt2:创建密钥kubectl create secret tls ibp-mobile-tls --cert=tls.crt 阅读全文
posted @ 2025-11-20 17:37 小蓝莓 阅读(7) 评论(0) 推荐(0)