Kubernetes - lxcsf正确识别容器资源
2021-11-08
centos7 安装libfue
#!/bin/bash
# 下载地址 https://github.com/libfuse/libfuse/releases/tag/fuse-2.9.7
yum install -y gcc
cd /usr/local/src
wget https://github.com/libfuse/libfuse/releases/download/fuse-2.9.7/fuse-2.9.7.tar.gz
tar -zxvf fuse-2.9.7.tar.gz
cd fuse-2.9.7/ && ./configure && make && make install
echo -e '\n/usr/local/lib' >> /etc/ld.so.conf
ldconfig
cp /usr/local/lib/libfuse.so.2.9.7 /usr/lib64/
ln -s /usr/lib64/libfuse.so.2.9.7 /usr/lib64/libfuse.so
ln -s /usr/lib64/libfuse.so.2.9.7 /usr/lib64/libfuse.so.2
demo
https://github.com/denverdino/lxcfs-admission-webhook.git
- Deploy lxcfs to worker nodes
kubectl apply -f deployment/lxcfs-daemonset.yaml
- Install injector with lxcfs-admission-webhook
deployment/install.sh
- Enable the namespace for injection
kubectl label namespace default lxcfs-admission-webhook=enabled
总结
lxcfs
支持容器镜像 Centos系统
、Ubuntu系统
、Debian系统
,但是不支持容器镜像 Alpine系统
。
因为 Alpine 不是使用 Gnu libc
,而是使用 musl libc
。
标题:Kubernetes - lxcsf正确识别容器资源
地址:https://blog.njqhome.com:8443/articles/2021/08/25/1629861746480.html