Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
cf292754
Commit
cf292754
authored
Oct 30, 2017
by
Rohit Agarwal
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Run nvidia-gpu device-plugin daemonset as an addon on GCE nodes that have nvidia GPUs attached.
parent
9c7baf94
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
53 additions
and
0 deletions
+53
-0
daemonset.yaml
cluster/addons/device-plugins/nvidia-gpu/daemonset.yaml
+45
-0
common.sh
cluster/common.sh
+5
-0
configure-helper.sh
cluster/gce/gci/configure-helper.sh
+3
-0
No files found.
cluster/addons/device-plugins/nvidia-gpu/daemonset.yaml
0 → 100644
View file @
cf292754
apiVersion
:
extensions/v1beta1
kind
:
DaemonSet
metadata
:
name
:
nvidia-gpu-device-plugin
namespace
:
kube-system
labels
:
k8s-app
:
nvidia-gpu-device-plugin
addonmanager.kubernetes.io/mode
:
Reconcile
spec
:
template
:
metadata
:
labels
:
k8s-app
:
nvidia-gpu-device-plugin
spec
:
affinity
:
nodeAffinity
:
requiredDuringSchedulingIgnoredDuringExecution
:
nodeSelectorTerms
:
-
matchExpressions
:
-
key
:
cloud.google.com/gke-accelerator
operator
:
Exists
hostNetwork
:
true
hostPID
:
true
volumes
:
-
name
:
device-plugin
hostPath
:
path
:
/var/lib/kubelet/device-plugins
-
name
:
dev
hostPath
:
path
:
/dev
containers
:
-
image
:
"
gcr.io/google-containers/nvidia-gpu-device-plugin@sha256:943a62949cd80c26e7371d4e123dac61b4cc7281390721aaa95f265171094842"
command
:
[
"
/usr/bin/nvidia-gpu-device-plugin"
,
"
-logtostderr"
]
name
:
nvidia-gpu-device-plugin
resources
:
requests
:
cpu
:
10m
memory
:
10Mi
securityContext
:
privileged
:
true
volumeMounts
:
-
name
:
device-plugin
mountPath
:
/device-plugin
-
name
:
dev
mountPath
:
/dev
cluster/common.sh
View file @
cf292754
...
@@ -875,6 +875,11 @@ EOF
...
@@ -875,6 +875,11 @@ EOF
CLUSTER_SIGNING_DURATION:
$(
yaml-quote
${
CLUSTER_SIGNING_DURATION
})
CLUSTER_SIGNING_DURATION:
$(
yaml-quote
${
CLUSTER_SIGNING_DURATION
})
EOF
EOF
fi
fi
if
[[
"
${
NODE_ACCELERATORS
:-}
"
==
*
"type=nvidia"
*
]]
;
then
cat
>>
$file
<<
EOF
ENABLE_NVIDIA_GPU_DEVICE_PLUGIN:
$(
yaml-quote
"true"
)
EOF
fi
else
else
# Node-only env vars.
# Node-only env vars.
...
...
cluster/gce/gci/configure-helper.sh
View file @
cf292754
...
@@ -1796,6 +1796,9 @@ function start-kube-addons {
...
@@ -1796,6 +1796,9 @@ function start-kube-addons {
if
[[
"
${
ENABLE_METRICS_SERVER
:-}
"
==
"true"
]]
;
then
if
[[
"
${
ENABLE_METRICS_SERVER
:-}
"
==
"true"
]]
;
then
setup-addon-manifests
"addons"
"metrics-server"
setup-addon-manifests
"addons"
"metrics-server"
fi
fi
if
[[
"
${
ENABLE_NVIDIA_GPU_DEVICE_PLUGIN
:-}
"
==
"true"
]]
;
then
setup-addon-manifests
"addons"
"device-plugins/nvidia-gpu"
fi
if
[[
"
${
ENABLE_CLUSTER_DNS
:-}
"
==
"true"
]]
;
then
if
[[
"
${
ENABLE_CLUSTER_DNS
:-}
"
==
"true"
]]
;
then
setup-addon-manifests
"addons"
"dns"
setup-addon-manifests
"addons"
"dns"
local
-r
kubedns_file
=
"
${
dst_dir
}
/dns/kube-dns.yaml"
local
-r
kubedns_file
=
"
${
dst_dir
}
/dns/kube-dns.yaml"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment