Este contenido no está disponible en el idioma seleccionado.
Chapter 6. Creating a site on Kubernetes using the Skupper CLI
Using the skupper command-line interface (CLI) allows you to create and manage sites from the context of the current namespace.
A typical workflow is to create a site, link sites together, and expose services to the application network.
6.1. Checking the Skupper CLI Copiar enlaceEnlace copiado en el portapapeles!
Installing the skupper command-line interface (CLI) provides a simple method to get started with Skupper.
- Follow the instructions for Installing Skupper.
Verify the installation.
skupper version COMPONENT VERSION cli 2.1.1
skupper version COMPONENT VERSION cli 2.1.1
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
6.2. Creating a simple site using the CLI on Kubernetes Copiar enlaceEnlace copiado en el portapapeles!
Prerequisites
-
The
skupper
CLI is installed. - The Skupper controller is running on the Kubernetes cluster you are running or you are running on a platform.
Procedure
Check that the
SKUPPER_PLATFORM
environment is unset or set tokubernetes
.-
kubernetes
- default -
podman
-
docker
-
linux
-
Create a site on Kubernetes:
skupper site create <site-name> --namespace <namespace>
skupper site create <site-name> --namespace <namespace>
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Specifying the namespace is not required if the context is set to the namespace where you want to create the site. For example:
skupper site create my-site Waiting for status... Site "my-site" is ready.
skupper site create my-site Waiting for status... Site "my-site" is ready.
Copy to Clipboard Copied! Toggle word wrap Toggle overflow There are many options to consider when creating sites using the CLI, see CLI Reference, including frequently used options.
For example
--enable-link-access
If enabled, this option allows you create tokens and link to this site. By default, this option is disabled but you can change the setting later
skupper site update --enable-link-access
.--timeout <time>
You can add the timeout option to specify the maximum time for the CLI wait for the site status to report
ready
.skupper site create my-site --timeout 2m
skupper site create my-site --timeout 2m
Copy to Clipboard Copied! Toggle word wrap Toggle overflow The timeout option does not stop the site from being created, but if the site is not ready, the following is output:
Site "my-site" is not yet ready: Pending
Site "my-site" is not yet ready: Pending
Copy to Clipboard Copied! Toggle word wrap Toggle overflow You can check the status of the site at any time using
skupper site status
.
6.3. Deleting a site using the CLI on Kubernetes Copiar enlaceEnlace copiado en el portapapeles!
Prerequisites
-
The
skupper
CLI is installed.
Procedure
Change context to the namespace where the site was created, for example:
kubectl config set-context --current --namespace west
kubectl config set-context --current --namespace west
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Enter the following command to delete a site:
skupper site delete
skupper site delete
Copy to Clipboard Copied! Toggle word wrap Toggle overflow