上一页 1 ··· 21 22 23 24 25 26 27 28 29 ··· 53 下一页

2024年1月28日

main.go无法引用同目录下其他文件的函数和变量以及常量

摘要: // main_call_other_file_const_define.go package main const ( Num = 10 ) // main_call_other_file_const.go package main import "fmt" func main() { fmt.P 阅读全文

posted @ 2024-01-28 11:27 王景迁 阅读(239) 评论(0) 推荐(0)

多个cni插件共存时kubelet调用哪个

摘要: k8s v1.19.0 默认情况下,k8s不支持多个cni插件混用。在/etc/cni/net.d存在多个cni配置时,dockershim只会加载按字母顺序排序的第1个插件。 cmd/kubelet/app/options/container_runtime.goNewContainerRunti 阅读全文

posted @ 2024-01-28 10:46 王景迁 阅读(89) 评论(0) 推荐(0)

C++类指针未初始化导致访问成员变量时报段错误

摘要: # 安装gcc和g++ yum install gcc yum install gcc-c++.x86_64 // a.cpp #include <iostream> #include <unistd.h> using namespace std; class Test { public: void 阅读全文

posted @ 2024-01-28 10:04 王景迁 阅读(94) 评论(0) 推荐(0)

2024年1月25日

client-go令牌桶限流配置

摘要: func addListWatchCfgAndClient() { cfg, err := clientcmd.BuildConfigFromFlags("", "/root/.kube/config") if err != nil { klog.Fatalf("Error building kub 阅读全文

posted @ 2024-01-25 13:32 王景迁 阅读(118) 评论(0) 推荐(0)

2024年1月16日

client-go异常场景分析

摘要: k8s v1.19.0 场景1:同步时连不上kube-apiserver会一直阻塞 WaitForCacheSync一直阻塞,直到成功或者控制器停止。 W0115 13:01:55.329881 18339 reflector.go:535] pkg/mod/k8s.io/client-go@v0. 阅读全文

posted @ 2024-01-16 23:10 王景迁 阅读(310) 评论(0) 推荐(0)

2024年1月15日

go依赖和编译报错

摘要: 问题1:go: updates to go.mod needed; to update it: go mod tidy方法:go clean -modcache && go mod tidy 问题2:go: updates to go.mod needed, disabled by -mod=ven 阅读全文

posted @ 2024-01-15 22:56 王景迁 阅读(721) 评论(0) 推荐(0)

2024年1月14日

client-go连接数

摘要: 单节点k8s集群 v1.19.0 服务创建的https连接数量 client-go用于访问kube-apiserver,可以list/watch k8s资源。 组件名称 访问kube-apiserver方式 单个实例的https连接数 kube-scheduler 本机ip 2 kube-contr 阅读全文

posted @ 2024-01-14 16:01 王景迁 阅读(107) 评论(0) 推荐(0)

2024年1月12日

dlv调试时访问不可达函数报错please use a line with a statement

摘要: package main import ( "fmt" "time" ) func test() { fmt.Println("") } func main() { time.Sleep(1000 * time.Second) } go build -gcflags=all="-N -l" -o t 阅读全文

posted @ 2024-01-12 09:26 王景迁 阅读(146) 评论(0) 推荐(0)

nettrace诊断报文

摘要: 安装Ubuntu Server 23.10 下载Ubuntu https://ubuntu.com/download/server mirror address填写为 http://mirrors.aliyun.com/ubuntu/ 安装Nettrace 下载nettrace rpm包 https 阅读全文

posted @ 2024-01-12 09:11 王景迁 阅读(243) 评论(0) 推荐(0)

2024年1月11日

C语言 指针偏移量计算

摘要: #include <stdio.h> struct s { int a; int b; }; int main() { struct s s1; // (struct s*)0表示0x0作为struct s首地址 // &((struct s*)0)->a代表a地址 // 因为struct s首地址 阅读全文

posted @ 2024-01-11 08:36 王景迁 阅读(213) 评论(0) 推荐(0)

上一页 1 ··· 21 22 23 24 25 26 27 28 29 ··· 53 下一页

导航