Skip to content

Commit

Permalink
auto push
Browse files Browse the repository at this point in the history
  • Loading branch information
go-bai committed Jul 28, 2024
1 parent 45f8ab5 commit ff1185f
Show file tree
Hide file tree
Showing 4 changed files with 89 additions and 12 deletions.
15 changes: 10 additions & 5 deletions content/about.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,24 +8,29 @@ author: gobai
### 目前在学的内容

- golang
- kubernetes
- kubevirt
- **golang**
- **kubernetes**
- **kubevirt**
- ceph
- linux
- openstack
- terraform
- postgresql
- mysql
- redis
- sqlite
- linux

### 我的设备

- Macbook Pro 2018 15 inch 16+256
- 零刻 SER5 Pro AMD Ryzen7-5700U
- Ubuntu 22.04 + QEMU/KVM
- 5G CPE VN009
- iPad mini6
- OnePlus 9R

### 联系方式:

- email: `NTk5NTAwNjg4QHFxLmNvbQ==`
```bash
echo -n NTk5NTAwNjg4QHFxLmNvbQ== | base64 -d
```
36 changes: 36 additions & 0 deletions content/posts/k8s/rke2.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,42 @@ mv linux-amd64/helm /usr/local/bin/helm
rm -f helm-${HELM_LATEST_VERSION}-linux-amd64.tar.gz && rm -rf linux-amd64/
```

## RKE2架构

RKE2 Server 和 Agent 有利用 k3s 的 agent

### 进程生命周期

rke2进程使用systemd守护运行, rke2生成containerd进程和kubelet进程, 然后apiserver controller-manager scheduler etcd kube-proxy以static pod的形式被kubelet启动

containerd进程退出时rke2也会重启, kubelet进程退出时rke2会再拉起一个kubelet进程

```bash
# ps -e --forest
899 ? 01:32:51 rke2
1101 ? 01:58:12 \_ containerd
1123 ? 05:23:44 \_ kubelet
1227 ? 00:02:15 containerd-shim
1344 ? 00:00:00 \_ pause
1500 ? 05:12:21 \_ etcd
1228 ? 00:02:22 containerd-shim
1353 ? 00:00:00 \_ pause
2516 ? 06:26:44 \_ kube-controller
1229 ? 00:02:16 containerd-shim
1342 ? 00:00:00 \_ pause
2614 ? 00:44:00 \_ cloud-controlle
1267 ? 00:02:18 containerd-shim
1363 ? 00:00:00 \_ pause
1452 ? 00:08:46 \_ kube-proxy
1920 ? 00:00:00 \_ timeout <defunct>
1283 ? 00:02:19 containerd-shim
1341 ? 00:00:00 \_ pause
1541 ? 00:51:47 \_ kube-scheduler
1801 ? 00:20:15 containerd-shim
1821 ? 00:00:00 \_ pause
1852 ? 15:16:04 \_ kube-apiserver
```

## 安装 rook ceph

https://rook.io/docs/rook/latest-release/Getting-Started/quickstart/
Expand Down
43 changes: 43 additions & 0 deletions content/posts/virt/libvirt.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
---
title: "Libvirt"
date: 2024-07-27T22:57:08+08:00
draft: false
toc: true
tags: [libvirt,virsh]
---

## `virsh` 命令

### `virsh domifaddr` 查看虚拟机网卡ip


```bash
# virsh domifaddr k3s-node01 --source lease
Name MAC address Protocol Address
-------------------------------------------------------------------------------
```

通过arp获取网卡ip

```bash
# virsh domifaddr k3s-node01 --source arp
Name MAC address Protocol Address
-------------------------------------------------------------------------------
vnet18 52:54:00:0e:08:02 ipv4 192.168.1.248/0
```

通过qemu guest agent获取网卡ip

```bash
# virsh domifaddr k3s-node01 --source agent
Name MAC address Protocol Address
-------------------------------------------------------------------------------
lo 00:00:00:00:00:00 ipv4 127.0.0.1/8
enp1s0 52:54:00:0e:08:02 ipv4 192.168.1.248/24
flannel.1 92:61:59:0c:29:90 ipv4 10.42.0.0/32
cni0 42:fb:8d:3e:c1:a4 ipv4 10.42.0.1/24
vethde547696 da:18:a8:b2:ed:f0 N/A N/A
vethe1841f6e ce:79:fc:e1:1e:0b N/A N/A
veth464995dc 82:a9:3b:a6:b5:49 N/A N/A
veth2370e2ac 4a:c8:32:5c:fb:34 N/A N/A
```
7 changes: 0 additions & 7 deletions content/posts/virt/virtio-vs-scsi.md

This file was deleted.

0 comments on commit ff1185f

Please sign in to comment.