摘要: 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 阅读(6656) 评论(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 阅读(1870) 评论(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 阅读(272) 评论(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 阅读(476) 评论(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 阅读(441) 评论(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 阅读(310) 评论(0) 推荐(0)
摘要: # 登录 Pod 所在节点的 Shell 脚本 ``` bash #!/usr/bin/env bash # # author: liy # filename: entry_node.sh if [ $# -lt 1 ];then printf "Usage: %s [Namespace]\n" " 阅读全文
posted @ 2022-06-10 14:08 liy36 阅读(308) 评论(0) 推荐(0)
摘要: package main import ( "fmt" "os" "path/filepath" "github.com/spf13/viper" "go.uber.org/zap" ) var ( logger *zap.Logger pwd string config *viper.Viper 阅读全文
posted @ 2022-03-24 17:12 liy36 阅读(249) 评论(0) 推荐(0)
摘要: 设置时区 var cstZone = time.FixedZone("CST", 8*3600) // 东八 time.Local = cstZone // https://www.cnblogs.com/foxhappy/p/14577735.html 获取操作 当前时间 package main 阅读全文
posted @ 2022-03-24 16:53 liy36 阅读(192) 评论(0) 推荐(0)
摘要: #!/usr/bin/env bash # __Author__="liy" # 根据容器内使用的客户端端口查找对应的镜像是哪个,使用此脚本即可查询。 port="$1" function check_env(){ if [ -z "$port" ];then echo -e "\033[31mUs 阅读全文
posted @ 2022-01-04 16:39 liy36 阅读(105) 评论(0) 推荐(0)