摘要:
kubectl exec -it my-pod -- bash # 配置 kubectl 使用 ServiceAccount 的 Token kubectl config set-credentials in-cluster \ --token=$(cat /var/run/secrets/kube 阅读全文
摘要:
图形化工具 OneDrive // 网盘 Tencent Lemon // 垃圾清理 Snipaste // 截图工具 VNC Viewer // VNC 客户端 Local Send // 局域网文件传输工具 Microsoft Remote Desktop Beta // Windows 连接工 阅读全文
摘要:
package main import ( "encoding/json" "fmt" "log" "strings" ) type Structs struct { Name string `json:"name"` Gender int `json:"gender"` } // MarshalJ 阅读全文
摘要:
#!/usr/bin/env bash # Author=liy36 export PS4='\[\e[35m\]+ $(basename $0):${FUNCNAME}:$LINENO: \[\e[0m\]' if [ "$(id -u)" -ne 0 ];then echo "Switch to 阅读全文
摘要:
创建带密码的zip压缩包 package main import ( "io" "io/fs" "log" "os" "path/filepath" "strings" "github.com/alexmullins/zip" ) func init() { log.SetFlags(log.Lsh 阅读全文
摘要:
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # from collections import namedtuple # 定义一个命名元组来存储赎回费率的期限和费率 RedemptionRate = namedtuple("RedemptionRat 阅读全文
摘要:
Go使用HTTP的私有仓库中的模块 1. 导入方设置Go变量 go env -w GOPRIVATE='gitlab.xxe.example.com' go env -w GOINSECURE='gitlab.xxe.example.com' # 因为中间多了一级.xxe导致不能用通配域名 2. 仓 阅读全文
摘要:
查看Pod日志中显示 pthread_create failed: Resource temporarily unavailable 通过监控系统查看节点的进程数 topk(3,sum(container_threads{cluster="env",node="worker-13"}) by (po 阅读全文
摘要:
# Prometheus常用查询 ## 集群指标 ``` promql # CPU核心总数 sum(machine_cpu_cores{cluster="$cluster",job="kubelet"}) by(cluster) # CPU请求总数 sum(kube_pod_container_re 阅读全文
摘要:
# jq 命令常用语法 > demo数据 ``` json [ { "name": "user_b75b", "password": "UC9NxVUzfEVq", "instance_id": "rm-3aa3c7a51c6d6491d2421822" }, { "name": "user_fc4 阅读全文