摘要: package main import ( "fmt" "sync" ) var wg sync.WaitGroup var number, letter = make(chan bool, 1), make(chan bool, 1) func printInt() { defer wg.Done 阅读全文
posted @ 2023-03-09 21:03 liy36 阅读(41) 评论(0) 推荐(0) 编辑
摘要: # 使用懒加载优化bash启动速度 ## 优化前 bash补全配置 ``` bash # ~/.bash_profile source .bash_completion # ~/.bash_completion source '/opt/homebrew/etc/profile.d/bash_com 阅读全文
posted @ 2023-02-20 14:09 liy36 阅读(71) 评论(0) 推荐(0) 编辑
摘要: # Ansible 批量配置 ssh 公钥 ``` yaml - hosts: k8s remote_user: root tasks: - name: Set authorized key taken from file authorized_key: user: root state: pres 阅读全文
posted @ 2022-11-20 11:56 liy36 阅读(26) 评论(0) 推荐(0) 编辑
摘要: 使用Containerd构建容器镜像 一. 安装Containerd 1.1. 下载软件包 https://github.com/containerd/containerd/releases wget https://github.com/containerd/containerd/releases 阅读全文
posted @ 2022-08-17 15:10 liy36 阅读(2065) 评论(0) 推荐(0) 编辑
摘要: Containerd配置镜像加速 参考文档 修改步骤 1. 修改Config.toml文件 1.x.x 版本配置文件 [plugins."io.containerd.grpc.v1.cri".registry] config_path = "/etc/containerd/certs.d" # 镜像 阅读全文
posted @ 2022-08-16 10:30 liy36 阅读(6323) 评论(0) 推荐(0) 编辑
摘要: ``` #!/bin/bash # filename: a.sh # 设置PS4环境变量 export PS4='+ $(basename "$0"):${FUNCNAME}:$LINENO: ' if [ "$debug" == "true" -o "$debug" == "yes" ];then 阅读全文
posted @ 2022-08-12 16:04 liy36 阅读(1862) 评论(0) 推荐(0) 编辑
摘要: 环境准备 1. 下载Kubernetes软件包 # https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG/CHANGELOG-1.24.md wget https://storage.googleapis.com/kuberne 阅读全文
posted @ 2022-08-11 15:42 liy36 阅读(250) 评论(0) 推荐(0) 编辑
摘要: ETCD集群使用TLS证书 ETCD配置文件 172.20.1.26 ## /etc/etcd/etcd.conf # Member ETCD_NAME=etcd-01 ETCD_DATA_DIR="/apps/etcd/" ETCD_LISTEN_CLIENT_URLS="https://172. 阅读全文
posted @ 2022-07-31 16:48 liy36 阅读(437) 评论(0) 推荐(0) 编辑
摘要: 一、成员管理 1. 添加成员 a. 执行增加节点操作 etcdctl member add etcd-04 --peer-urls="http://172.20.1.29:2380" Member 158ed98009d1a70d added to cluster 7191d024b8a252eb 阅读全文
posted @ 2022-07-30 12:42 liy36 阅读(391) 评论(0) 推荐(0) 编辑
摘要: 一、创建数据存储目录 mkdir /apps/etcd/ -pv 二、创建配置文件目录 mkdir /etc/etcd/ 三、编辑配置文件 配置文件中的 ETCD_INITIAL_CLUSTER 参数请按需修改 服务启动成功之后执行 sed -i '/ETCD_INITIAL_CLUSTER_STA 阅读全文
posted @ 2022-07-30 12:41 liy36 阅读(304) 评论(0) 推荐(0) 编辑
点击右上角即可分享
微信分享提示