上一页 1 ··· 30 31 32 33 34 35 36 37 38 ··· 41 下一页

2023年4月19日

dlv分析GO高CPU应用

摘要: delve是golang推荐的go语言调试工具。 构造100% CPU应用 package main import ( "time" ) func add() { i := 0 for { i++ } } func main() { go add() time.Sleep(time.Hour) } 阅读全文

posted @ 2023-04-19 16:53 王景迁 阅读(127) 评论(0) 推荐(0) 编辑

2023年4月16日

docker网络模式

摘要: Docker有4种网络模式(--network=) bridge默认模式,分配network namespace和IP,连接到docker0网桥上。 host使用主机IP,不分配network namespace和IP,和宿主机共用network namespace。 container和已存在的某 阅读全文

posted @ 2023-04-16 18:16 王景迁 阅读(18) 评论(0) 推荐(0) 编辑

flannel容器IP

摘要: docker没有分配IP cni0网桥相当于docker0网桥,veth对有一个会加在上面。 查看cni0网桥的端口 对应3个Pod 根据网络接口序号来查找veth另一端,veth对的两端mac地址不同 docker0上没有端口 阅读全文

posted @ 2023-04-16 17:50 王景迁 阅读(19) 评论(0) 推荐(0) 编辑

2023年4月15日

DaemonSet控制Pod拉起节点

摘要: k8s release-1.15 实验现象 创建ds apiVersion: apps/v1 kind: DaemonSet metadata: name: nginx spec: selector: matchLabels: app: nginx template: metadata: label 阅读全文

posted @ 2023-04-15 21:21 王景迁 阅读(19) 评论(0) 推荐(0) 编辑

stress模拟压力

摘要: 安装 yum install -y epel-release yum install -y stress 耗尽1个CPU stress --cpu 1 --timeout 60 top 耗尽内存 stress --vm 1 --vm-bytes 2G --vm-keep free -h 耗尽磁盘IO 阅读全文

posted @ 2023-04-15 13:53 王景迁 阅读(31) 评论(0) 推荐(0) 编辑

2023年4月13日

搭建Etcd集群

摘要: docker pull quay.io/coreos/etcd:v3.3.1 docker run -d --name etcd1 quay.io/coreos/etcd:v3.3.1 etcd -name etcd1 -advertise-client-urls http://172.17.0.2 阅读全文

posted @ 2023-04-13 22:29 王景迁 阅读(20) 评论(0) 推荐(0) 编辑

2023年4月9日

构造MySQL错误server has gone away

摘要: interactive_timeout和wait_timeout默认值是28800秒即8小时。 手动修改interactive_timeout时间为3秒 set global interactive_timeout=3; 重新进入MySQL查看值 interactive_timeout和wait_t 阅读全文

posted @ 2023-04-09 08:07 王景迁 阅读(19) 评论(0) 推荐(0) 编辑

2023年4月5日

Nginx容器安装vim命令

摘要: docker pull nginx:1.22.1 docker run -itd nginx:1.22.1 进入nginx容器 apt-get update apt-get install -y vim 阅读全文

posted @ 2023-04-05 15:24 王景迁 阅读(210) 评论(0) 推荐(0) 编辑

2023年3月26日

搭建主备MySQL

摘要: 拉取镜像 docker pull mysql:5.7 创建主备容器 docker run -itd --name mysql-master --cpu-period=1000000 --cpu-quota=500000 --memory 512M --rm -e MYSQL_ROOT_PASSWOR 阅读全文

posted @ 2023-03-26 20:54 王景迁 阅读(56) 评论(0) 推荐(0) 编辑

Maven

摘要: 安装Maven wget http://mirrors.tuna.tsinghua.edu.cn/apache/maven/maven-3/3.6.3/binaries/apache-maven-3.6.3-bin.zip unzip apache-maven-3.6.3-bin.zip -d /u 阅读全文

posted @ 2023-03-26 09:01 王景迁 阅读(14) 评论(0) 推荐(0) 编辑

上一页 1 ··· 30 31 32 33 34 35 36 37 38 ··· 41 下一页

导航