Skip to content

device commandΒΆ

The device command can be used to connect to, disconnect from, and view the connection status of naisdevice. Currently, the command requires the processes naisdevice-agent and naisdevice-helper to run, both of which can be run by starting naisdevice.

connectΒΆ

Requests a connection and waits for success. The expected result is "Connected".

nais device connect

disconnectΒΆ

Requests a disconnection and waits for success. The expected result is "Disconnected".

nais device disconnect

statusΒΆ

Prints the current connection status of naisdevice-agent. This includes connection status, as well as gateways and their current statuses.

nais device status
Flag Required Short Default Description
quiet No -q false Only print connection status.
output No -o yaml Specify one of yaml or json as output format

output format

If the output format and quiet flags are specified, output takes precedence.

configΒΆ

Shows and adjusts the naisdevice-agent configuration.

getΒΆ

Shows the current naisdevice-agent configuration. Currently, there are only to config fields: AutoConnect and CertRenewal.

nais device config get

setΒΆ

Sets a naisdevice-agent configuration field to a desired value.

nais device config set AutoConnect true
Argument Required Description
setting Yes The setting to adjust. Must be one of [autoconnect, certrenewal], case insensitive.
value Yes The value to set. Must be one of [true, false], or anything strconv.ParseBool can parse.