Up and Running

Want to quickly get a feel of Namespace? We have assembled three super-simple guides to get you started in no time. To get started, pick one of the following journeys:


Download the nsc CLI.

$ curl -fsSL https://get.namespace.so/cloud/install.sh | sh

Login to your Namespace account.

$ nsc login

Ephemeral Kubernetes Cluster

Need to quickly test your Kubernetes deployment? Create an ephemeral cluster with Namespace to get a fresh, isolated environment.

$ nsc create
Created cluster "7te0imdnud59s"

That’s it! Within seconds, your cluster is created and ready to use.

Note the id of the created cluster, as it will be needed for the next commands.

To interact with the cluster, we’ll ask nsc to generate a kubeconfig.

$ nsc kubeconfig write <id>
Wrote Kubeconfig for cluster <id> to <tmp/kubeconfig.yaml>.
Start using it by setting:
  export KUBECONFIG=<tmp/kubeconfig.yaml>

And then deploy your application with your regular kubectl.

$ export KUBECONFIG=<tmp/kubeconfig.yaml>
$ kubectl apply -f https://k8s.io/examples/application/nginx-app.yaml
service/my-nginx-svc created
deployment.apps/my-nginx created

Alternatively, nsc can download and configure kubectl for you.

Check out nsc kubectl

nsc can help you test your application even beyond kubectl. For full-power debugging, you can jump into a root shell from your CLI.

$ nsc ssh <id>
# And inside the cluster:
$ apk add curl
$ curl
<!DOCTYPE html>

Namespace also extracts cluster logs automatically so you can fetch them even after the cluster has been destroyed.

$ nsc logs <id>
2023-04-25T09:40:42Z "GET / HTTP/1.1" 200 612 "-" "curl/7.88.1" "-"

Development Preview

Want to quickly show your app to a colleague? Use Namespace to run ephemeral application previews.

To get started, navigate to the root directory of your application, or clone our tiny example.

$ git clone git@github.com:namespacelabs/nsc-go-app.git && cd nsc-go-app

Since we want to run the app in the cloud, let’s also build and push the image remotely. The container image will be pushed to the Workspace container registry.

$ nsc build . --name nsc-go-app:v0.0.1 --push
Pushed for linux/amd64:

Finally, we run the app in a shareable preview.

$ nsc run --image nscr.io/<workspace-id>/nsc-go-app:v0.0.1 -p 80
Created new ephemeral environment! (id: jqv4dr5skm83g).
More at: https://cloud.namespace.so/<workspace-id>/cluster/jqv4dr5skm83g
Running "nginx-u8uuq"
  Exported 80/tcp as https://sdf6sig-jqv4dr5skm83g.fra1.nscluster.cloud

The first link (cloud.namespace.so) brings you to the Namespace Dashboard, allowing you to inspect application logs, or jump into SSH, all within your browser.

Namespace Web UI

The second link (nscluster.cloud) provides a live preview of your application. The preview requires login and is only accessible to members of your workspace.

Namespace Preview Authentication

Full-power Web UI

On the go and want to quickly poke at Kubernetes? Create a cluster and jump into action, all from within your browser.

  1. Open the dashboard at https://cloud.namespace.so/
  2. On the top right, hit “Create Instance.
  3. After a few seconds, the “New SSH session” button becomes active. Click it!
  4. Now, your sitting in the cluster with a preconfigured kubectl. Give it a spin with:
$ kubectl apply -f https://k8s.io/examples/application/nginx-app.yaml
Namespace Cluster SSH terminal