-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Failed to create csi-node-driver pods #9701
Labels
Comments
UPD. /var/lib/calico/nodename file available in calico-node container but it content different from hostname: /home/alpine # kubectl exec -n calico-system -it calico-node-wzrq8 -c calico-node -- bash
[root@ALPINE-k8s-master-node-1 /]# ls -lh /var/lib/calico/nodename
-rw-r--r-- 1 root root 24 Jan 11 03:07 /var/lib/calico/nodename
[root@ALPINE-k8s-master-node-1 /]# cat /var/lib/calico/nodename
alpine-k8s-master-node-1[root@ALPINE-k8s-master-node-1 /]#
[root@ALPINE-k8s-master-node-1 /]# cat /etc/hostname
ALPINE-k8s-master-node-1
[root@ALPINE-k8s-master-node-1 /]# exit
/home/alpine # cat /etc/hostname
ALPINE-k8s-master-node-1 |
I think I found the problem. csi-node-driver volumes does not contain the required(?): /home/alpine # kubectl get ds csi-node-driver -o yaml -n calico-system
apiVersion: apps/v1
kind: DaemonSet
metadata:
annotations:
deprecated.daemonset.template.generation: "1"
creationTimestamp: "2025-01-11T03:06:08Z"
generation: 1
name: csi-node-driver
namespace: calico-system
ownerReferences:
- apiVersion: operator.tigera.io/v1
blockOwnerDeletion: true
controller: true
kind: Installation
name: default
uid: c9a88568-17f2-4a51-bd40-ac0f07faf24b
resourceVersion: "674"
uid: 3cee57ca-e4a7-497a-ada3-82de529025b9
spec:
revisionHistoryLimit: 10
selector:
matchLabels:
k8s-app: csi-node-driver
template:
metadata:
creationTimestamp: null
labels:
app.kubernetes.io/name: csi-node-driver
k8s-app: csi-node-driver
name: csi-node-driver
spec:
containers:
- args:
- --nodeid=$(KUBE_NODE_NAME)
- --loglevel=$(LOG_LEVEL)
env:
- name: LOG_LEVEL
value: warn
- name: KUBE_NODE_NAME
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: spec.nodeName
image: docker.io/calico/csi:v3.29.1
imagePullPolicy: IfNotPresent
name: calico-csi
resources: {}
securityContext:
allowPrivilegeEscalation: true
capabilities:
drop:
- ALL
privileged: true
runAsGroup: 0
runAsNonRoot: false
runAsUser: 0
seccompProfile:
type: RuntimeDefault
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
volumeMounts:
- mountPath: /var/run
name: varrun
- mountPath: /csi
name: socket-dir
- mountPath: /var/lib/kubelet
mountPropagation: Bidirectional
name: kubelet-dir
- args:
- --v=5
- --csi-address=$(ADDRESS)
- --kubelet-registration-path=$(DRIVER_REG_SOCK_PATH)
env:
- name: ADDRESS
value: /csi/csi.sock
- name: DRIVER_REG_SOCK_PATH
value: /var/lib/kubelet/plugins/csi.tigera.io/csi.sock
- name: KUBE_NODE_NAME
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: spec.nodeName
image: docker.io/calico/node-driver-registrar:v3.29.1
imagePullPolicy: IfNotPresent
name: csi-node-driver-registrar
resources: {}
securityContext:
allowPrivilegeEscalation: true
capabilities:
drop:
- ALL
privileged: true
runAsGroup: 0
runAsNonRoot: false
runAsUser: 0
seccompProfile:
type: RuntimeDefault
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
volumeMounts:
- mountPath: /csi
name: socket-dir
- mountPath: /registration
name: registration-dir
dnsPolicy: ClusterFirst
nodeSelector:
kubernetes.io/os: linux
priorityClassName: system-node-critical
restartPolicy: Always
schedulerName: default-scheduler
securityContext: {}
serviceAccount: csi-node-driver
serviceAccountName: csi-node-driver
terminationGracePeriodSeconds: 30
tolerations:
- key: CriticalAddonsOnly
operator: Exists
- effect: NoSchedule
operator: Exists
- effect: NoExecute
operator: Exists
volumes:
- hostPath:
path: /var/run
type: ""
name: varrun
- hostPath:
path: /var/lib/kubelet
type: Directory
name: kubelet-dir
- hostPath:
path: /var/lib/kubelet/plugins/csi.tigera.io
type: DirectoryOrCreate
name: socket-dir
- hostPath:
path: /var/lib/kubelet/plugins_registry
type: Directory
name: registration-dir |
@whereyourspace is your issue solved now? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello. Sorry for my English. This text was written using web translation tools.
I'm trying to create a k8s cluster on Alpine VMs using kubeadm for educational purposes, but I can't install Calico. I want to learn Kubernetes deployment.
Context
Here are all the steps taken to prepare the VM and deploy K8S:
without
/var/lib/kubelet /var/lib/kubelet none defaults,bind 1 1
in /etc/fstab some modules throw errors and ask to share the mount directory. I want to use a different disk for Kubernetes:calico pods status:
Your Environment
If you need any more information, let me know. Thank you.
The text was updated successfully, but these errors were encountered: