mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-10 05:30:26 +00:00
Merge pull request #52003 from vfreex/mount-lib-modules
Automatic merge from submit-queue (batch tested with PRs 52003, 54559, 54518). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. Load kernel modules automatically inside a kube-proxy pod **What this PR does / why we need it**: This change will mount `/lib/modules` on host to the kube-proxy pod, so that a kube-proxy pod can load kernel modules by need or when `modprobe <kmod>` is run inside the pod. This will be convenient for kube-proxy running in IPVS mode. Users will don't have to run `modprobe ip_vs` on nodes before starting a kube-proxy pod. **Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes # **Special notes for your reviewer**: The kube-proxy IPVS proxier will check if the kernel supports IPVS, or it will fallback to iptables or userspace modes. There is a false negative condition in the check, #51874 addressed that issue. **Release note**: ```release-note Load kernel modules automatically inside a kube-proxy pod ```
This commit is contained in:
@@ -52,6 +52,9 @@ spec:
|
|||||||
- mountPath: /run/xtables.lock
|
- mountPath: /run/xtables.lock
|
||||||
name: xtables-lock
|
name: xtables-lock
|
||||||
readOnly: false
|
readOnly: false
|
||||||
|
- mountPath: /lib/modules
|
||||||
|
name: lib-modules
|
||||||
|
readOnly: true
|
||||||
volumes:
|
volumes:
|
||||||
- name: varlog
|
- name: varlog
|
||||||
hostPath:
|
hostPath:
|
||||||
@@ -60,4 +63,7 @@ spec:
|
|||||||
hostPath:
|
hostPath:
|
||||||
path: /run/xtables.lock
|
path: /run/xtables.lock
|
||||||
type: FileOrCreate
|
type: FileOrCreate
|
||||||
|
- name: lib-modules
|
||||||
|
hostPath:
|
||||||
|
path: /lib/modules
|
||||||
serviceAccountName: kube-proxy
|
serviceAccountName: kube-proxy
|
||||||
|
@@ -96,6 +96,9 @@ spec:
|
|||||||
- mountPath: /run/xtables.lock
|
- mountPath: /run/xtables.lock
|
||||||
name: iptableslock
|
name: iptableslock
|
||||||
readOnly: false
|
readOnly: false
|
||||||
|
- mountPath: /lib/modules
|
||||||
|
name: lib-modules
|
||||||
|
readOnly: true
|
||||||
volumes:
|
volumes:
|
||||||
- hostPath:
|
- hostPath:
|
||||||
path: /usr/share/ca-certificates
|
path: /usr/share/ca-certificates
|
||||||
@@ -114,3 +117,6 @@ spec:
|
|||||||
path: /run/xtables.lock
|
path: /run/xtables.lock
|
||||||
type: FileOrCreate
|
type: FileOrCreate
|
||||||
name: iptableslock
|
name: iptableslock
|
||||||
|
- name: lib-modules
|
||||||
|
hostPath:
|
||||||
|
path: /lib/modules
|
||||||
|
Reference in New Issue
Block a user