Skip to content

Deploy a Skipper Proxy

This example uses Skipper, an HTTP router and reverse proxy for service composition

To run this example, follow these steps:

  1. Install the kraft CLI tool and a container runtime engine, e.g. Docker.

  2. Clone the examples repository and cd into the examples/skipper/ directory:

Terminal window
git clone https://github.com/kraftcloud/examples
cd examples/skipper/

Make sure to log into Unikraft Cloud by setting your token and a metro close to you. We use fra0 (Frankfurt, 🇩🇪) in this guide:

Terminal window
# Set Unikraft Cloud access token
export UKC_TOKEN=token
# Set metro to Frankfurt, DE
export UKC_METRO=fra0

When done, invoke the following command to deploy this application on Unikraft Cloud:

Terminal window
kraft cloud deploy -p 443:9090 .

The output shows the instance URL and other details:

Terminal window
[] Deployed successfully!
────────── name: skipper-mx4ai
────────── uuid: 34e3d740-c2b0-4644-b7e1-647350f688dc
───────── state: running
─────────── url: https://aged-sea-o7d3c42s.fra0.kraft.host
───────── image: skipper@sha256:5483eaf3612cca2116ceaab9be42557686324f1d30337ae15d0495eef63d0386
───── boot time: 43.71 ms
──────── memory: 128 MiB
─────── service: aged-sea-o7d3c42s
── private fqdn: skipper-mx4ai.internal
──── private ip: 172.16.6.4
────────── args: /usr/bin/skipper -address :9090 -routes-file /etc/skipper/example.eskip

In this case, the instance name is skipper-mx4ai and the URL is https://aged-sea-o7d3c42s.fra0.kraft.host. They are different for each run.

Use curl to query the Unikraft Cloud instance of Skipper.

Terminal window
curl https://aged-sea-o7d3c42s.fra0.kraft.host
Hello, world from Skipper on Unikraft!

At any point in time, you can list information about the instance:

Terminal window
kraft cloud instance list
NAME FQDN STATE CREATED AT IMAGE MEMORY ARGS BOOT TIME
skipper-mx4ai aged-sea-o7d3c42s.fra0.kraft.host running 1 minute ago skipper@sha256:5483eaf... 128 MiB /usr/bin/skipper -address :9090 -routes-f... 43709us

When done, you can remove the instance:

Terminal window
kraft cloud instance remove skipper-mx4ai

Customize your Application

To customize Skipper you can modify the example.eskip configuration file.

Learn More

Use the --help option for detailed information on using Unikraft Cloud:

Terminal window
kraft cloud --help

Or visit the CLI Reference.