05 2023 档案
摘要:``` package main import ( "context" "fmt" "time" ) func main() { // 创建初始上下文 ctx := context.Background() // 派生可取消的上下文 cancelCtx, cancel := context.With
阅读全文
摘要:``` package main import ( "fmt" "time" ) func myGoroutine(stopCh <-chan struct{}) { // 在协程中监听停止信号 for { select { case <-stopCh: // 接收到停止信号,执行清理操作并退出 f
阅读全文
摘要:获取 服务账号 admin-user 的访问token kubectl -n kube-system create token admin-user 查看集群node 信息 kubectl get nodes -o wide
阅读全文
摘要:pod 的GVK 是什么 在 Kubernetes 中,GVK 是指 Group、Version 和 Kind 三个字段,用于唯一标识 Kubernetes 资源对象。 Group 指的是 Kubernetes API 中的资源组,例如 apps、batch、core 等。 Version 指的是资
阅读全文