Comments (9)
你的Kubelet是运行在容器内吗
from carina.
I0112 18:23:09.809418 1798 volume_manager.go:356] Waiting for volumes to attach and mount for pod "carina-deployment-bc8959776-vln75_carina(9c9efec6-fdcc-4a18-aff5-dfb8979564be)"
I0112 18:23:09.809462 1798 volume_manager.go:387] All volumes are attached and mounted for pod "carina-deployment-bc8959776-vln75_carina(9c9efec6-fdcc-4a18-aff5-dfb8979564be)"
kubelet这条日志看起来 挂载成功了。
from carina.
kubelet 不是容器化部署的,systemd托管的
from carina.
kubelet 不是容器化部署的,systemd托管的
这个确实令人费解啊 所有日志看起来都很正常。 有没有环境能让我登录看看
from carina.
环境是内网环境,暂时看不了,我想问下在carina-node容器中mount 目录之后,宿主机上可以看到这个目录吗?正常情况下的挂载是什么样的,可以发个图片看下吗?
from carina.
环境是内网环境,暂时看不了,我想问下在carina-node容器中mount 目录之后,宿主机上可以看到这个目录吗?正常情况下的挂载是什么样的,可以发个图片看下吗?
行 等我给你一份 正常的挂载是什么样的
from carina.
PVC
[root@192 ~]# kubectl get pvc -n carina
NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS AGE
csi-carina-pvc Bound pvc-4bf834d2-97ee-4b56-bbbd-06c252bae119 1Gi RWO csi-carina-sc 106s
carina-node容器内
$ kubectl exec -it csi-carina-node-xh9p8 -n kube-system -c csi-carina-node sh
kubectl exec [POD] [COMMAND] is DEPRECATED and will be removed in a future version. Use kubectl kubectl exec [POD] -- [COMMAND] instead.
sh-4.2# df -Th
Filesystem Type Size Used Avail Use% Mounted on
overlay overlay 41G 6.0G 36G 15% /
devtmpfs devtmpfs 908M 0 908M 0% /dev
shm tmpfs 64M 0 64M 0% /dev/shm
/dev/mapper/centos-root xfs 41G 6.0G 36G 15% /csi
tmpfs tmpfs 919M 9.8M 910M 2% /run/mount
tmpfs tmpfs 919M 0 919M 0% /sys/fs/cgroup
tmpfs tmpfs 919M 12K 919M 1% /var/lib/kubelet/pods/edff7fa8-2dd2-4f60-b10b-45cae8e57245/volumes/kubernetes.io~secret/calico-node-token-lkkwp
tmpfs tmpfs 919M 12K 919M 1% /var/lib/kubelet/pods/874f843e-1c91-402b-b04b-d5a5cd537f19/volumes/kubernetes.io~secret/kube-proxy-token-5tn8s
tmpfs tmpfs 919M 12K 919M 1% /run/secrets/kubernetes.io/serviceaccount
tmpfs tmpfs 919M 12K 919M 1% /var/lib/kubelet/pods/8721d98b-e9d4-4cf6-a4af-8b74a7e6056b/volumes/kubernetes.io~secret/carina-scheduler-sa-token-45m4z
tmpfs tmpfs 919M 12K 919M 1% /var/lib/kubelet/pods/c9a182f4-619d-4100-a8c2-8ed9ba60e9a7/volumes/kubernetes.io~secret/default-token-tvpds
/dev/carina/volume-pvc-4bf834d2-97ee-4b56-bbbd-06c252bae119 xfs 1014M 33M 982M 4% /var/lib/kubelet/pods/c9a182f4-619d-4100-a8c2-8ed9ba60e9a7/volumes/kubernetes.io~csi/pvc-4bf834d2-97ee-4b56-bbbd-06c252bae119/mount
节点上
[root@192 ~]# mount |grep pvc-4bf834d2-97ee-4b56-bbbd-06c252bae119
/dev/carina/volume-pvc-4bf834d2-97ee-4b56-bbbd-06c252bae119 on /var/lib/kubelet/pods/c9a182f4-619d-4100-a8c2-8ed9ba60e9a7/volumes/kubernetes.io~csi/pvc-4bf834d2-97ee-4b56-bbbd-06c252bae119/mount type xfs (rw,relatime,attr2,inode64,logbsize=64k,sunit=128,swidth=128,noquota)
容器内
[root@192 ~]# kubectl exec -it carina-deployment-d458db954-gwhmv -n carina bash
kubectl exec [POD] [COMMAND] is DEPRECATED and will be removed in a future version. Use kubectl kubectl exec [POD] -- [COMMAND] instead.
root@carina-deployment-d458db954-gwhmv:/# df -Th
Filesystem Type Size Used Avail Use% Mounted on
overlay overlay 41G 6.0G 36G 15% /
tmpfs tmpfs 64M 0 64M 0% /dev
tmpfs tmpfs 919M 0 919M 0% /sys/fs/cgroup
/dev/mapper/centos-root xfs 41G 6.0G 36G 15% /etc/hosts
shm tmpfs 64M 0 64M 0% /dev/shm
/dev/carina/volume-pvc-4bf834d2-97ee-4b56-bbbd-06c252bae119 xfs 1014M 33M 982M 4% /var/lib/www/html
tmpfs tmpfs 919M 12K 919M 1% /run/secrets/kubernetes.io/serviceaccount
tmpfs tmpfs 919M 0 919M 0% /proc/acpi
tmpfs tmpfs 919M 0 919M 0% /proc/scsi
tmpfs tmpfs 919M 0 919M 0% /sys/firmware
from carina.
问题原因找到了,是因为我的kubelet root dir 是 /data/docker/kubelet 而不是默认的 /var/lib/kubelet。
我把宿主机 /data/docker/kubelet 挂载到carina-node容器的/var/lib/kubelet中了,从而导致carina-node在mount目录的时候,mount到容器的/data/docker/kubelet目录,这个mount操作在宿主机不可见。
所以 说 mountpoint-dir 路径需要一致
from carina.
好的 ヽ( ̄▽ ̄)و
from carina.
Related Issues (20)
- metrics.md(cn and en) needs to be synchronized with code logic HOT 3
- 基于容量调度描述文档代码块语言类型导致页面显示有问题
- Storageclass not found when running example HOT 6
- carina-node deploy failed
- Missing capacity, disks, etc in NodeStorageResource after deployment
- Readme 中Blogs的链接会跳转到奇怪的地方 HOT 1
- 支持RAW缓存卷
- failed to mount ext4 bcache device to pod
- k8s节点notReady时,pod和pvc自动迁移失败 HOT 1
- A potential risk in carina which can be leveraged to get cluster's admin token HOT 2
- 宿主机重启导致vg卷处于未激活状态
- Create new release which include support for Kubernetes v1.25 HOT 1
- no kind "KubeSchedulerConfiguration" is registered for version "kubescheduler.config.k8s.io/v1" in scheme "k8s.io/kubernetes/pkg/scheduler/apis/config/scheme/scheme.go:30" HOT 3
- 支持磁盘缩容吗 HOT 2
- If you delete a mounted subdirectory, the carina-node controller checkout all paths to the node that make mount failure
- 2023下半年版本及任务规划 HOT 1
- CSIStorageCapacity Support HOT 1
- a potential security risk in carina
- 同一VG在不同Label上的规则匹配问题 HOT 1
- Report the use of components with vulnerabilities in carina
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from carina.