これで使える。とりあえずこれでよかろう
[~]$ uname -a
Darwin HONODH-no-MacBook-Pro.local 18.2.0 Darwin Kernel Version 18.2.0: Thu Dec 20 20:46:53 PST 2018; root:xnu-4903.241.1~1/RELEASE_X86_64 x86_64
[~]$ kubectl get nodes
NAME STATUS ROLES AGE VERSION
ai-chan Ready controlplane,etcd,worker 39d v1.11.6
[~]$ kubectl describe node ai-chan
Name: ai-chan
Roles: controlplane,etcd,worker
Labels: beta.kubernetes.io/arch=amd64
beta.kubernetes.io/os=linux
kubernetes.io/hostname=ai-chan
node-role.kubernetes.io/controlplane=true
node-role.kubernetes.io/etcd=true
node-role.kubernetes.io/worker=true
Annotations: field.cattle.io/creatorId:
flannel.alpha.coreos.com/backend-data: {"VtepMAC":"06:07:71:43:3b:7d"}
flannel.alpha.coreos.com/backend-type: vxlan
flannel.alpha.coreos.com/kube-subnet-manager: true
flannel.alpha.coreos.com/public-ip: 192.168.10.13
node.alpha.kubernetes.io/ttl: 0
rke.cattle.io/external-ip: 192.168.10.13
rke.cattle.io/internal-ip: 192.168.10.13
volumes.kubernetes.io/controller-managed-attach-detach: true
CreationTimestamp: Wed, 16 Jan 2019 00:58:07 +0900
Taints: <none>
Unschedulable: false
Conditions:
Type Status LastHeartbeatTime LastTransitionTime Reason Message
---- ------ ----------------- ------------------ ------ -------
OutOfDisk False Mon, 25 Feb 2019 00:32:09 +0900 Wed, 16 Jan 2019 00:58:07 +0900 KubeletHasSufficientDisk kubelet has sufficient disk space available
MemoryPressure False Mon, 25 Feb 2019 00:32:09 +0900 Wed, 16 Jan 2019 00:58:07 +0900 KubeletHasSufficientMemory kubelet has sufficient memory available
DiskPressure False Mon, 25 Feb 2019 00:32:09 +0900 Wed, 16 Jan 2019 00:58:07 +0900 KubeletHasNoDiskPressure kubelet has no disk pressure
PIDPressure False Mon, 25 Feb 2019 00:32:09 +0900 Wed, 16 Jan 2019 00:58:07 +0900 KubeletHasSufficientPID kubelet has sufficient PID available
Ready True Mon, 25 Feb 2019 00:32:09 +0900 Wed, 16 Jan 2019 01:01:17 +0900 KubeletReady kubelet is posting ready status
Addresses:
InternalIP: 192.168.10.13
Hostname: ai-chan
Capacity:
cpu: 6
ephemeral-storage: 489703416Ki
hugepages-1Gi: 0
hugepages-2Mi: 0
memory: 32823704Ki
nvidia.com/gpu: 1
pods: 110
Allocatable:
cpu: 6
ephemeral-storage: 451310667439
hugepages-1Gi: 0
hugepages-2Mi: 0
memory: 32721304Ki
nvidia.com/gpu: 1
pods: 110
System Info:
Machine ID: 3e608929fbd39b959f388bf468c9f0b1
System UUID: 545D7C00-09C9-11E9-A894-CF6A385D3200
Boot ID: 13bf2372-33c3-4290-851c-3f3ee0cb5c10
Kernel Version: 4.15.0-45-generic
OS Image: Ubuntu 18.04.2 LTS
Operating System: linux
Architecture: amd64
Container Runtime Version: docker://18.9.1
Kubelet Version: v1.11.6
Kube-Proxy Version: v1.11.6
PodCIDR: 10.42.0.0/24
Non-terminated Pods: (9 in total)
Namespace Name CPU Requests CPU Limits Memory Requests Memory Limits AGE
--------- ---- ------------ ---------- --------------- ------------- ---
cattle-system cattle-cluster-agent-7fd98cc4b5-xr46b 0 (0%) 0 (0%) 0 (0%) 0 (0%) 29d
cattle-system cattle-node-agent-rhc5s 0 (0%) 0 (0%) 0 (0%) 0 (0%) 29d
ingress-nginx default-http-backend-797c5bc547-4rnrf 10m (0%) 10m (0%) 20Mi (0%) 20Mi (0%) 39d
ingress-nginx nginx-ingress-controller-44hl7 0 (0%) 0 (0%) 0 (0%) 0 (0%) 39d
kube-system canal-kqwvw 250m (4%) 0 (0%) 0 (0%) 0 (0%) 39d
kube-system kube-dns-7588d5b5f5-llrtl 260m (4%) 0 (0%) 110Mi (0%) 170Mi (0%) 39d
kube-system kube-dns-autoscaler-5db9bbb766-dzmfw 20m (0%) 0 (0%) 10Mi (0%) 0 (0%) 39d
kube-system metrics-server-97bc649d5-lgnwx 0 (0%) 0 (0%) 0 (0%) 0 (0%) 39d
kube-system nvidia-device-plugin-daemonset-qdnn4 0 (0%) 0 (0%) 0 (0%) 0 (0%) 2d23h
Allocated resources:
(Total limits may be over 100 percent, i.e., overcommitted.)
Resource Requests Limits
-------- -------- ------
cpu 540m (9%) 10m (0%)
memory 140Mi (0%) 190Mi (0%)
ephemeral-storage 0 (0%) 0 (0%)
nvidia.com/gpu 0 0
Events: <none>
上記のコマンド出力は、nvidia の device plugin を導入後のもの。"nvidia.com/gpu:1" と RTX2070 が k8s から認識されている