# Skipper

import { Tabs, TabsContent, TabsList, TabsTrigger } from "zudoku/ui/Tabs"

{/* vale off */}
{/* THIS FILE WAS AUTOGENERATED FROM THE PUBLIC EXAMPLE REPOSITORY. DO NOT EDIT THIS FILE DIRECTLY. */}


This example uses [`Skipper`](https://opensource.zalando.com/skipper/), an HTTP router and reverse proxy for service composition

To run this example, follow these steps:

1. Install the [unikraft CLI](/cli).
   You need a [BuildKit](https://github.com/moby/buildkit) builder. The easiest way to get one is via [Docker](https://docs.docker.com/engine/install/).
   Alternatively, you can also directly set up and use BuildKit, see the [quick start](https://github.com/moby/buildkit#quick-start).

2. Clone the [`examples` repository](https://github.com/unikraft-cloud/examples) and `cd` into the `examples/skipper0.18/` directory:

   ```bash
   git clone https://github.com/unikraft-cloud/examples
   cd examples/skipper0.18/
   ```

Make sure to log into Unikraft Cloud and pick a [metro](/platform/metros) close to you.
This guide uses `fra` (Frankfurt, 🇩🇪):

```bash
unikraft login
```

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

```bash
unikraft build . --output <my-org>/skipper018:latest
unikraft run --metro fra \
  -m 256M \
  -p 443:9090/tls+http \
  --scale-to-zero policy=on,cooldown-time=1000,stateful=true \
  --image <my-org>/skipper018:latest
```

The output shows the instance address and other details:

```ansi
[1mmetro[22m:        fra
[1mname[22m:         skipper018-mx4ai
[1muuid[22m:         34e3d740-c2b0-4644-b7e1-647350f688dc
[1mstate[22m:        [38;2;144;161;185mstarting[0m
[1mimage[22m:        <my-org>/skipper018
[1mresources[22m:
[3m  memory[23m:     256MiB
[3m  vcpus[23m:      1
[1mservice[22m:
[3m  uuid[23m:       b32c9035-d669-79fa-9955-9ad52cd1fcb4
[3m  name[23m:       aged-sea-o7d3c42s
[3m  domains[23m:
[3m  - fqdn[23m:     aged-sea-o7d3c42s.fra.unikraft.app
[1mnetworks[22m:
[3m- uuid[23m:       70cfb329-9ab3-fc8c-aff9-a3bbbbeb70f3
[3m  private-ip[23m: 10.0.6.4
[3m  mac[23m:        12:b0:32:1b:02:7b
[1mtimestamps[22m:
[3m  created[23m:    just now
```

In this case, the instance name is `skipper018-mx4ai` and the address is `https://aged-sea-o7d3c42s.fra.unikraft.app`.
They're different for each run.

Use `curl` to query the Unikraft Cloud instance of Skipper.

```bash
curl https://aged-sea-o7d3c42s.fra.unikraft.app
```

```text
Hello, world from Skipper on Unikraft!
```

You can list information about the instance by running:

```bash
unikraft instances list
```

```ansi
[1mMETRO[22m  [1mNAME[22m              [1mSTATE[22m    [1mIMAGE[22m                [1mARGS[22m  [1mMEMORY[22m  [1mVCPUS[22m  [1mFQDN[22m                                [1mCREATED[22m
fra    skipper018-mx4ai  [38;2;0;188;125mrunning[0m  <my-org>/skipper018        256MiB  1      aged-sea-o7d3c42s.fra.unikraft.app  2 minutes ago
```

When done, you can remove the instance:

```bash
unikraft instances delete skipper018-mx4ai
```

## Customize your app

To customize Skipper you can change the `example.eskip` configuration file.

## Learn more

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

```bash
unikraft --help
```

Or visit the [CLI Reference](/cli/unikraft).
{/* vale on */}
