Files
zl-base-in-kube/1.k8s/README.md
2024-07-02 19:58:16 +07:00

53 lines
1.4 KiB
Markdown

# k8s кластер
## Нужно
1. rke - <https://github.com/rancher/rke/releases>
2. k8s-lens - <https://docs.k8slens.dev>
3. helm - <https://helm.sh/docs/intro/quickstart/>
4. Три машины на ubuntu 22.04 + docker
## Разворачиваем куб
1. `rke up --ignore-docker-version`
2. полученный конфиг импортируем в линзу
3. в настройках подключаем метрики
## Полезные команды
```bash
apt update && apt install -y mc htop zip wget curl git jq net-tools gnupg2 screen open-iscsi
curl https://get.docker.com -o install.sh && sh install.sh
```
## Твики
### is apparently in use by the system; will not make a filesystem here!
* Create the default configuration file /etc/multipath.conf if not existed
* Add the following line to blacklist section devnode "^sd[a-z0-9]+"
```config
blacklist {
devnode "^sd[a-z0-9]+"
}
```
* Restart multipath service# systemctl restart multipathd.service
* Verify that configuration is applied# multipath -t
### Failed to allocate directory watch: Too many open files
на всех нодах кластера:
```bash
sysctl fs.inotify.max_user_watches=65536
sysctl fs.inotify.max_user_instances=8192
sysctl net.ipv4.tcp_max_syn_backlog=100000
sysctl net.core.somaxconn=100000
sysctl net.ipv4.tcp_wmem='4096 12582912 16777216'
sysctl net.ipv4.tcp_rmem='4096 12582912 16777216'
sysctl net.ipv4.ip_local_port_range='10240 65535'
```