Skip to content

neterialio/cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 

Repository files navigation

Neterial CLI

Command-line interface for Neterial services.

Features

  • Install a Kubernetes cluster in your Hetzner Cloud account
  • Adding/removing worker nodes
  • Out-of-the-box: Cilium CNI, Metrics Server, Hetzner Cloud Controller Manager, Hetzner CSI

Quick start

Creating a Kubernets cluster named default in your Hetzner Cloud account.

You need to have a Hetzner Cloud account. If you don't have one yet, you can register with our referral link and receive €20 in Hetzner Cloud credits.

  1. Login

    docker run --rm -ti -p 9999:9999 -v neterial:/app/config ghcr.io/neterialio/cli init
  2. Create a Kubernetes cluster

    docker run --rm -v neterial:/app/config ghcr.io/neterialio/cli kube create cluster
  3. Get the kubeconfig

    docker run --rm -v neterial:/app/config ghcr.io/neterialio/cli kube get kubeconfig > default-kubeconfig
  4. Work with your cluster

    kubectl --kubeconfig default-kubeconfig get nodes

More commands

Creating cluster with a name

docker run --rm -v neterial:/app/config ghcr.io/neterialio/cli kube create cluster \
    --name thename

List all clusters

docker run --rm -v neterial:/app/config ghcr.io/neterialio/cli kube get clusters

Create cluster with 2 worker nodes and located in Ashburn USA

docker run --rm -v neterial:/app/config ghcr.io/neterialio/cli kube create cluster \
  --name thename --location ash --worker-count 2

Show help and all flags for "kube create cluster" command

docker run --rm -v neterial:/app/config ghcr.io/neterialio/cli kube create cluster -h

Add a node

docker run --rm -v neterial:/app/config ghcr.io/neterialio/cli kube create node \
    --cluster thename

Remove a node

# List all nodes
docker run --rm -v neterial:/app/config ghcr.io/neterialio/cli kube get nodes \
    --cluster thename

# Remove the one
docker run --rm -v neterial:/app/config ghcr.io/neterialio/cli kube delete node \
    --cluster hello --node thenodename

Resources configuration (VM, CPU, RAM, DISK)

You can choose the VM used for the worker. This is how you can control the compute capacity of your cluster.

Adding a node with a specific configuration

docker run --rm -v neterial:/app/config ghcr.io/neterialio/cli kube create node \
    --cluster thename --vm-type VM_TYPE

Creating cluster with a specific worker nodes

docker run --rm -v neterial:/app/config ghcr.io/neterialio/cli kube create cluster \
    --name thename --worker-vm-type VM_TYPE

See the full list of VM-types

Clean up the system

  1. Remove the cluster/clusters

    docker run --rm -v neterial:/app/config ghcr.io/neterialio/cli kube delete cluster --name thename
  2. Remove the docker image

    docker rmi ghcr.io/neterialio/cli
  3. Remove the volume with config file

    docker volume rm neterial

Removing account

Warning
This operation will remove your account completely. You will retain access to your clusters, but managing them using the Neterial platform will be unavailable.

docker run --rm -ti -v neterial:/app/config ghcr.io/neterialio/cli account delete

That's it.