/bear2.png.webp

打工人日志

kubernetes 从1.23.x 升级到 1.24.x

kubernetes 从1.23.x 升级到 1.24.x k8s 在1.24.x之后的版本放弃了和 docker 的兼容,使用 containerd 作为底层的容器,直接参照官方文档的资料进行更新就会报错。因为你没有

编写 kubernetes 资源描述文件

编写 kubernetes 资源描述文件 1. 部署一个应用 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 apiVersion: apps/v1 #与k8s集群版本有关,使用 kubectl api-versions 即可查看当前集群支持的版本 kind: Deployment #该

nginx ssh-key connection exception

nginx ssh-key connection exception Not long ago, I wanted to restart the company’s gitlab server.I couldn’t coonect to ssh when it restarted.emm……I try copy the ssh rsa.pub,but it didn’t work. error log: 1 identity_sign: private key ~/.ssh/id_rsa contents do not match public what is happen? solution reconfigure gitlab ssh

kubernetes manual expansion

k8s manual expansion We find k8s-master node.Input the Command: expand 1 kubectl scale --replicas=3 deploy my-test-deploy shrink 1 kubectl scale --replicas=1 deploy my-test-deploy trouble cleaning get resource list 1 2 3 4 5 6 7 kubectl get deployment kubectl get pods kubectl get nodes # exists in the namespace kubectl api-resources --namespaced=true # not exists in the namespace kubectl api-resources --namespaced=false show info

nginx exporter 安装配置

nginx exporter 安装配置 二进制安装 1 2 wget https://github.com/nginxinc/nginx-prometheus-exporter/releases/download/v0.10.0/nginx-prometheus-exporter_0.10.0_linux_amd64.tar.gz tar -zxvf nginx-prometheus-exporter_0.10.0_linux_amd64.tar.gz -C ./nginx-exporter 在 nginx 上配置 1 2 3 4 5 ./configure \ … \ --with-http_stub_status_module make sudo make install 在 nginx.config 上配置 1 2 3 4 5 6 7 server { # 新增 location /nginx_status { stub_status on; access_log off; } } 重启 nginx 服务

go Struct 结构体

go Struct 结构体 结构体是将零个或多个任意类型的变量,组合在一起的聚合数据类型,也可以看做是数据的集合。 声明结构体 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17

go Slice切片语法

go Slice 切片语法 切片是一种动态数组,比数组操作灵活,长度不是固定的,可以进行追加和删除。 len() 和 cap() 返回结果可相同和不同。 声明切片 1 2 3 4 5 6 7 8 9 10

go 基础知识

go 基础知识 目录结构 1 2 3 4 5 6 ├─ code -- 代码根目录 │ ├─ bin │ ├─ pkg │ ├─ src │ ├── hello │ ├── hello.go bin 存放编译后可执行的文件。 pkg 存放编译后的应用包。

VSCode插件推荐=> Code Runner

VSCode 插件推荐=> Code Runner Run code snippet or code file for multiple languages: C, C++, Java, JavaScript, PHP, Python, Perl, Perl 6, Ruby, Go, Lua, Groovy, PowerShell, BAT/CMD, BASH/SH, F# Script, F# (.NET Core), C# Script, C# (.NET Core), VBScript, TypeScript, CoffeeScript, Scala, Swift, Julia, Crystal, OCaml Script, R, AppleScript, Elixir, Visual Basic .NET, Clojure, Haxe, Objective-C, Rust, Racket, Scheme, AutoHotkey, AutoIt,

ant build.xml 编写

ant build.xml 编写 生成 build.xml Eclipse 自动生成 Ant 的Build.xml 配置文件,生成的方法很隐蔽 选择你要生成Build.xml文件的项目,右键. Export-> General -> Ant Buildfiles . 点 Nex