摘要: 1,下载tls版本 https://prometheus.io/download/ 2,做好时间同步软链接 2 * * * * /sbin/ntpdate ntp1.aliyun.com &>/dev/null ln -s /prometheus/package/prometheus-3.5.0.l 阅读全文
posted @ 2025-12-30 21:33 shuix1ng 阅读(0) 评论(0) 推荐(0)
摘要: 1. 导入必要包 import ( "bytes" "encoding/json" "fmt" "io/ioutil" "net/http" "net/url" "time" ) net/http: 核心HTTP客户端和服务器功能 encoding/json: JSON编解码 io/ioutil: 阅读全文
posted @ 2025-12-30 16:36 shuix1ng 阅读(4) 评论(0) 推荐(0)
摘要: 前端必须配置 1. Axios全局设置(推荐) // axios全局配置 axios.defaults.withCredentials = true; // 或在每个请求中单独设置 axios.get('/api', { withCredentials: true }) 注意:无论GET/POST/ 阅读全文
posted @ 2025-12-30 16:32 shuix1ng 阅读(2) 评论(0) 推荐(0)
摘要: 在 Kubernetes 的 RBAC 认证体系中,组(Group) 和 用户(User) 的配置主要在以下方面存在差异: 1. 证书配置区别 用户证书(User) { "CN": "linux84", // 用户名(唯一标识) "names": [ { "O": "oldboyedu" // 用户 阅读全文
posted @ 2025-12-30 16:31 shuix1ng 阅读(1) 评论(0) 推荐(0)
摘要: 在 Kubernetes 中,如果需要在容器启动时 执行多条命令,可以通过以下几种方式实现(按推荐度排序): 方法 1:通过 Shell 模式(推荐) 使用 command: ["/bin/sh", "-c"] + 多行 args 执行多条命令: containers: - name: my-con 阅读全文
posted @ 2025-12-30 16:30 shuix1ng 阅读(2) 评论(0) 推荐(0)
摘要: 从 NFS Provisioner (nfs-client-provisioner) 的日志来看,问题的核心是: 关键错误 E0806 14:01:35.881674 1 controller.go:1004] provision "default/test-claim" class "manage 阅读全文
posted @ 2025-12-30 16:30 shuix1ng 阅读(3) 评论(0) 推荐(0)
摘要: *前言* 这里写一个用kubeadm搭建k8s的1.29.x版本,依此来把当前文章变成后续 版本的通用部署k8s文章 ,容器运行时有好几个 containerd、CRI-O、Docker Engine(使用 cri-dockerd),这里选containerd containerd安装参考手册 ⭐ 阅读全文
posted @ 2025-12-30 16:28 shuix1ng 阅读(2) 评论(0) 推荐(0)
摘要: 以下是博客文章内容总结的 Remi 安装使用方法,适用于 CentOS/RHEL 系统: 1. 安装 Remi 仓库 Remi 提供了最新版本的 PHP 和常用扩展,需先安装仓库文件: # CentOS 7 sudo yum install -y https://rpms.remirepo.net/ 阅读全文
posted @ 2025-12-30 16:27 shuix1ng 阅读(2) 评论(0) 推荐(0)
摘要: middlewares/authmiddleware.go // 导入必要的包 package middlewares import ( "net/http" // HTTP 状态码和常量 "time" // 时间操作,用于设置 token 过期时间 "github.com/gin-gonic/gi 阅读全文
posted @ 2025-12-30 16:25 shuix1ng 阅读(0) 评论(0) 推荐(0)
摘要: main.go package main import ( "gojwt/routers" "log" "github.com/gin-gonic/gin" ) func FaultError(err error, error string) { if err != nil { log.Printf 阅读全文
posted @ 2025-12-30 14:40 shuix1ng 阅读(1) 评论(0) 推荐(0)