Getting Started
Download Sharedkube CLI
Install from Homebrew:
brew tap sharedkubeio/skctl
brew install skctl
skctl
Install with pipx:
pipx install git+https://github.com/sharedkubeio/skctl
Switch to your zone
Remember to first create the zone in the Sharedkube app.
-
Login:
noteRun the command below, replacing
<your_api_token>
with your actual token.skctl login <your_api_token>
tipIf you have used
skctl
before, confirm the override of any existing token by typingy
.# A token is already saved. Do you want to override it? [y/N]: y
Example:
$ skctl login a43f4ag5hsr56hjr6sr6hsr6hsr6hsr6yhrfes4se4fgsxxxxxxxxxxxxxxxxxxx
# Login successful. Token saved. Hello Patryk -
List Zones:
noteView available zones with:
skctl zones
Example:
$ skctl zones
# ID Name CPU Memory Storage Status Type
# 71xxxx28-xxxx-4835-9868-xxxxxx6de5ea my-company-dev 1 2Gi 10G draft Zone.Namespace.NamespaceRQuota
# 0fxxxx3d-xxxx-4a47-9a74-xxxxxx25a000 my-company-prod 1 2Gi 10G running Zone.Namespace.NamespaceRQuota -
Switch Zone:
noteSwitch to a specific zone by updating kubeconfig context.
Command:
skctl switch <zone_name>
Example:
$ skctl switch my-company-prod
# Updated kubeconfig for zone: my-company-prod
Useful Additional Commands
Verify Connection
kubectl get pods
Example:
$ kubectl get pods
# No resources found in sk-roundmelon namespace. # It works!
Check the current namespace name
kubectl config view --minify --output 'jsonpath={..namespace}'
Example:
$ kubectl config view --minify --output 'jsonpath={..namespace}'
# sk-roundmelon
Now you’re ready to deploy your applications in Sharedkube.
Deploy your first application
You can now deploy your first application to your namespace in a common way using
kubectl
, helm
, helmfile
, etc.
In the example below we will:
- deploy a simple nginx application
- expose it via ingress on sharedkube user free subdomain
helm install my-release oci://registry-1.docker.io/bitnamicharts/nginx \
--version 15.9.3 \
--set resources.requests.cpu=100m \
--set resources.requests.memory=128Mi \
--set resources.limits.cpu=100m \
--set resources.limits.memory=128Mi \
--set service.type=ClusterIP \
--set ingress.enabled=true \
--set ingress.hostname=<your_namespace>.sharedkube.io
Now you can access your application via https://<your_namespace>.sharedkube.io
.
Read more in Cloud Native Deployment guide. At Sharedkube, we are making sure to follow official CNCF definition of Cloud Native Ecosystem.