DOCKER NODE INSPECT
Commande : docker node inspect
Usage: docker node inspect [OPTIONS] self|NODE [NODE...] Display detailed information on one or more nodes Options: -f, --format string Format the output using the given Go template --pretty Print the information in a human friendly format
Afficher les détails d’un node
$ docker node inspect [OPTIONS] node|self [node...]
ex :
$ docker node inspect --format '{{ .ManagerStatus.Leader }}' self
true
$ docker node inspect --format '{{ json .Description.Platform }}' node1
{"Architecture":"x86_64","OS":"linux"}
$ docker node inspect --pretty node1
ID: 2tbkss0ywais935a56ejcsaj3
Hostname: node1
Joined at: 2018-10-21 19:05:14.878395727 +0000 utc
Status:
State: Ready
Availability: Active
Address: 192.168.99.105
Manager Status:
Address: 192.168.99.105:2377
Raft Status: Reachable
Leader: Yes
Platform:
Operating System: linux
Architecture: x86_64
Resources:
CPUs: 1
Memory: 995.6MiB
Plugins:
Log: awslogs, fluentd, gcplogs, gelf, journald, json-file, logentries, splunk, syslog
Network: bridge, host, macvlan, null, overlay
Volume: local
Engine Version: 18.06.1-ce
Engine Labels:
- provider=virtualbox
TLS Info:
TrustRoot:
-----BEGIN CERTIFICATE-----
MIIBajCCARCgAwIBAgIUXIa6elKTTq0CSQUVhmfIQRHoSrYwCgYIKoZIzj0EAwIw
EzERMA8GA1UEAxMIc3dhcm0tY2EwHhcNMTgxMDIxMTkwMDAwWhcNMzgxMDE2MTkw
MDAwWjATMREwDwYDVQQDEwhzd2FybS1jYTBZMBMGByqGSM49AgEGCCqGSM49AwEH
A0IABGMlpMvLZq0801dyPKWfDgkIG2gw9YvVuB0+M/llXQF0tAj6aViUHDL9zz/h
wP4NCIvVS62EjcYBznUUwDuspmujQjBAMA4GA1UdDwEB/wQEAwIBBjAPBgNVHRMB
Af8EBTADAQH/MB0GA1UdDgQWBBRy3qXZMoadwuY4iT7/YmfOttjY+TAKBggqhkjO
PQQDAgNIADBFAiAtYZnKgoQffUWcM0CwGfspa0eyYeDtKn0n+R45Keb6ggIhAJDd
8FuL10fGSJpa5ZRarESYPODM4oWYsX+HyN12UE6C
-----END CERTIFICATE-----
Issuer Subject: MBMxETAPBgNVBAMTCHN3YXJtLWNh
Issuer Public Key: MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEYyWky8tmrTzTV3I8pZ8OCQgbaDD1i9W4HT4z+WVdAXS0CPppWJQcMv3PP+HA/g0Ii9VLrYSNxgHOdRTAO6ymaw==
true
$ docker node inspect node1
[
{
"ID": "2tbkss0ywais935a56ejcsaj3",
"Version": {
"Index": 9
},
"CreatedAt": "2018-10-21T19:05:14.878395727Z",
"UpdatedAt": "2018-10-21T19:05:15.396961294Z",
"Spec": {
"Labels": {},
"Role": "manager",
"Availability": "active"
},
"Description": {
"Hostname": "node1",
"Platform": {
"Architecture": "x86_64",
"OS": "linux"
[...]
"Status": {
"State": "ready",
"Addr": "192.168.99.105"
},
"ManagerStatus": {
"Leader": true,
"Reachability": "reachable",
"Addr": "192.168.99.105:2377"
}
}
]