mirror of
https://github.com/intel/intel-device-plugins-for-kubernetes.git
synced 2025-06-03 03:59:37 +00:00
gpu_plugin: add kustomizations
- Default deployment: `kubectl apply -k deployments/gpu_plugin` - Default deployment does not specify namespace anymore (was: `kube-system`). - Variant: deploy only on nodes with Intel GPU label by NFD: `kubectl apply -k deployments/gpu_plugin/overlays/nfd_labeled_nodes` - Variant: deploy to `kube-system` instead of user-defined namespace (or "default"): `kubectl apply -k deployments/gpu_plugin/overlays/namespace_kube-system` - GPU plugin README updated. Signed-off-by: Antti Kervinen <antti.kervinen@intel.com>
This commit is contained in:
parent
f036b72cff
commit
d568f050c5
@ -84,10 +84,22 @@ Successfully tagged intel/intel-gpu-plugin:devel
|
|||||||
|
|
||||||
### Deploy plugin DaemonSet
|
### Deploy plugin DaemonSet
|
||||||
|
|
||||||
You can then use the example DaemonSet YAML file provided to deploy the plugin.
|
You can then use the [example DaemonSet YAML](../../deployments/gpu_plugin/base/intel-gpu-plugin.yaml)
|
||||||
|
file provided to deploy the plugin. The default kustomization that deploys the YAML as is:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ kubectl create -f ./deployments/gpu_plugin/gpu_plugin.yaml
|
$ kubectl apply -k deployments/gpu_plugin
|
||||||
|
daemonset.apps/intel-gpu-plugin created
|
||||||
|
```
|
||||||
|
|
||||||
|
Alternatively, if your cluster runs
|
||||||
|
[Node Feature Discovery](https://github.com/kubernetes-sigs/node-feature-discovery),
|
||||||
|
you can deploy the device plugin only on nodes with Intel GPU.
|
||||||
|
The [nfd_labeled_nodes](../../deployments/gpu_plugin/overlays/nfd_labeled_nodes/)
|
||||||
|
kustomization adds the nodeSelector to the DaemonSet:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
$ kubectl apply -k deployments/gpu_plugin/overlays/nfd_labeled_nodes
|
||||||
daemonset.apps/intel-gpu-plugin created
|
daemonset.apps/intel-gpu-plugin created
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -2,7 +2,6 @@ apiVersion: apps/v1
|
|||||||
kind: DaemonSet
|
kind: DaemonSet
|
||||||
metadata:
|
metadata:
|
||||||
name: intel-gpu-plugin
|
name: intel-gpu-plugin
|
||||||
namespace: kube-system
|
|
||||||
labels:
|
labels:
|
||||||
app: intel-gpu-plugin
|
app: intel-gpu-plugin
|
||||||
spec:
|
spec:
|
2
deployments/gpu_plugin/base/kustomization.yaml
Normal file
2
deployments/gpu_plugin/base/kustomization.yaml
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
resources:
|
||||||
|
- intel-gpu-plugin.yaml
|
2
deployments/gpu_plugin/kustomization.yaml
Normal file
2
deployments/gpu_plugin/kustomization.yaml
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
bases:
|
||||||
|
- base
|
@ -0,0 +1,5 @@
|
|||||||
|
apiVersion: apps/v1
|
||||||
|
kind: DaemonSet
|
||||||
|
metadata:
|
||||||
|
name: intel-gpu-plugin
|
||||||
|
namespace: kube-system
|
@ -0,0 +1,4 @@
|
|||||||
|
bases:
|
||||||
|
- ../../base
|
||||||
|
patches:
|
||||||
|
- add-namespace-kube-system.yaml
|
@ -0,0 +1,9 @@
|
|||||||
|
apiVersion: apps/v1
|
||||||
|
kind: DaemonSet
|
||||||
|
metadata:
|
||||||
|
name: intel-gpu-plugin
|
||||||
|
spec:
|
||||||
|
template:
|
||||||
|
spec:
|
||||||
|
nodeSelector:
|
||||||
|
feature.node.kubernetes.io/pci-0300_8086.present: "true"
|
@ -0,0 +1,4 @@
|
|||||||
|
bases:
|
||||||
|
- ../../base
|
||||||
|
patches:
|
||||||
|
- add-nodeselector-intel-gpu.yaml
|
Loading…
Reference in New Issue
Block a user