nuctl
is Nuclio's command-line interface (CLI), which provides command-line access to Nuclio features.
To install nuctl
, simply visit the Nuclio releases page and download the appropriate CLI binary for your environment (for example, nuctl-<version>-darwin-amd64 for a machine running macOS).
You can use the following command to download the latest nuctl
release:
curl -s https://api.github.com/repos/nuclio/nuclio/releases/latest \
| grep -i "browser_download_url.*nuctl.*$(uname)" \
| cut -d : -f 2,3 \
| tr -d \" \
| wget -O nuctl -qi - && chmod +x nuctl
After you download nuctl
, use the --help
option to see full usage instructions:
nuctl --help
nuctl
automatically identifies the platform from which it's being run.
You can also use the --platform
CLI flag to ensure that you're running against a specific platform, as explained in this reference:
To force nuctl
to run locally, using a Docker daemon, add --platform local
to the CLI command.
For an example of function deployment using nuctl
against Docker, see the Nuclio Docker getting-started guide.
To force nuctl
to run against a Kubernetes instance of Nuclio, add --platform kube
to the CLI command.
When running on Kubernetes, nuctl
requires a running registry on your Kubernetes cluster and access to a kubeconfig file.
For an example of function deployment using nuctl
against a Kubernetes cluster, see the Nuclio Kubernetes getting-started guide.
While in most cases using nuctl
on the Local Docker platform enables you to invoke your function by running the
nuctl invoke
command on the host, in Kubernetes platform this is a bit trickier - and will most likely not work
by default for some configurations. This means, for example, that nuctl invoke
command will not be able to work
unless your function is explicitly exposed or reachable from wherever you run nuctl invoke
.
See exposing a function for more details.
For your convenience, when deploying a function using nuctl
, exposing it via a NodePort
can be easily done by using the
CLI arg --http-trigger-service-type=nodePort
.