Docker 部署 Rancher 指定镜像仓库

docker 启动的 rancher 默认会走公网获取镜像,添加了 CATTLE_SYSTEM_DEFAULT_REGISTRY 的话,helm-operation 使用的 rancher/shell 等还是会走到公网,如果要所有镜像都是用 private registry,可以通过下面的方式。

Read more

RKE2 Calico 指定网卡

calico-node 的 IP_AUTODETECTION_METHOD 默认使用 first-found,如果节点存在多张网卡的时候,可能导致 calico-node 绑定到错误的网卡上,导致跨节点网络不通。

可以通过修改 IP_AUTODETECTION_METHOD 为 interface 或者 cidrs 来指定 calico-node 绑定到指定网卡上。

Read more

Rancher Elemental 使用随记

简介

Rancher Elemental 用于快速部署和管理基于容器的操作系统,如 SLE Micro 和 openSUSE MicroOS。它专为边缘计算和云原生环境设计,可以提供极简、易维护的操作系统。

Read more

RKE2 Cilium without kube-proxy

集群如果使用 Cilium 作为 cni 的话,可以实现 Kubernetes Without kube-proxy。

Cilium 的 kube-proxy 替代程序依赖于 socket-LB 功能,需要使用 v4.19.57、v5.1.16、v5.2.0 或更高版本的 Linux 内核。Linux 内核 v5.3 和 v5.8 增加了其他功能,Cilium 可利用这些功能进一步优化 kube-proxy 替代实现。

已有的 RKE2 Cilium 集群,可以通过下面的步骤开启此功能。

Read more

RKE1 ETCD 出现 request cluster id mismatch 问题修复记录

当集群中三个 Control Plane 节点的 ETCD 出现 request cluster ID mismatch 问题时,可以保留一个 ETCD 实例通过 --force-new-cluster 参数重建集群,然后再将其他两个节点的 ETCD 实例加入集群。

Read more

NeuVector 的 Zero Draft 与 Basic 模式

NeuVector 有 Zero-drift 和 Basic 两种模式,而 Zero-drift 模式是默认模式,根据一个 Nginx 来作为测试案例,观察两种模式下 Process Profile Rules 的效果。

Read more

调用 NeuVector API 进行镜像扫描

开启 REST API

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
cat <<EOF | kubectl apply -f -
apiVersion: v1
kind: Service
metadata:
name: neuvector-service-controller
namespace: cattle-neuvector-system
spec:
ports:
- port: 10443
name: controller
protocol: TCP
type: NodePort
selector:
app: neuvector-controller-pod
EOF
Read more