摘要: 在 Kubernetes (K8s) 中,hostAliases 是一种用于在 Pod 中配置主机名与 IP 地址映射的机制。通过使用 hostAliases,你可以将指定的主机名映射到 Pod 所在节点的 IP 地址,从而实现对主机名的自定义解析。这对于一些特定的用例,比如与主机上的外部资源进行交 阅读全文
posted @ 2023-11-01 13:05 吃吃吃大王 阅读(609) 评论(0) 推荐(0)
摘要: echo -e "\033[31m\033[01m\033[05m [ 这里改成要显示的内容 ]\033[0m" >> ~/.bash_profile #重新登录服务器就可以看到闪光的高亮字体 阅读全文
posted @ 2023-10-30 16:04 吃吃吃大王 阅读(123) 评论(0) 推荐(0)
摘要: 检查自己新建的包与主入口文件是不是在同一级目录,如果不在同一级就会报404!! 阅读全文
posted @ 2023-10-11 14:22 吃吃吃大王 阅读(56) 评论(0) 推荐(0)
摘要: vi /usr/local/share/lua/5.1/kong/runloop/handler.lua 第1015行 修改自定义提示信息后请求一个不存在的路由 vi /usr/local/share/lua/5.1/kong/error_handlers.lua 第67-80行 修改自定义提示信息 阅读全文
posted @ 2023-09-22 11:42 吃吃吃大王 阅读(53) 评论(0) 推荐(0)
摘要: worker_processes 2; events { worker_connections 1024; } http { include mime.types; default_type application/octet-stream; log_format aka_logs '{"@time 阅读全文
posted @ 2023-09-08 11:34 吃吃吃大王 阅读(71) 评论(0) 推荐(0)
摘要: 脚本功能:停止原有容器,按照用户传入的参数启动新的容器 使用系统自带的方法需要安装依赖 yum install redhat-lsb vi docker-deploy.sh #!/bin/bash lsb_functions="/lib/lsb/init-functions" if test -f 阅读全文
posted @ 2023-07-26 13:11 吃吃吃大王 阅读(310) 评论(0) 推荐(0)
摘要: 一、基础配置 user root; worker_processes 1; events { worker_connections 10240; } http { log_format '$remote_addr - $remote_user [$time_local] ' '"$request" 阅读全文
posted @ 2023-07-20 15:29 吃吃吃大王 阅读(84) 评论(0) 推荐(0)
摘要: 一、配置多个location匹配规则 location ^~ /admin { alias /var/www/admin/; index regist.html; } location / { root /data/html/; index index.html index.html; } 二、ro 阅读全文
posted @ 2023-07-20 15:18 吃吃吃大王 阅读(106) 评论(0) 推荐(0)
摘要: #!/bin/bash # 获取虚拟机启动时间戳 boot_timestamp=$(date -d "$(uptime -s)" +%s) # 当前时间戳 current_timestamp=$(date +%s) # 计算运行时长(以秒为单位) runtime=$((current_timesta 阅读全文
posted @ 2023-07-18 15:10 吃吃吃大王 阅读(142) 评论(0) 推荐(0)
摘要: 在/etc/profile 或者 /etc/bashrc最后追加 export HISTTIMEFORMAT="%Y-%m-%d %H:%M:%S " 阅读全文
posted @ 2023-06-13 17:09 吃吃吃大王 阅读(366) 评论(0) 推荐(0)