Skip to content

Latest commit

 

History

History
74 lines (51 loc) · 2.93 KB

nuctl.md

File metadata and controls

74 lines (51 loc) · 2.93 KB

The Nuclio CLI (nuctl)

In this document

Overview

nuctl is Nuclio's command-line interface (CLI), which provides command-line access to Nuclio features.

Download and Installation

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

Usage

After you download nuctl, use the --help option to see full usage instructions:

nuctl --help

The running platform

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:

Local Docker

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.

Kubernetes

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.

Invoking a function using nuctl on Kubernetes

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.