From 26bf4af23e1b9cf6a640263104b976c5c0b214f9 Mon Sep 17 00:00:00 2001 From: Paul Wright <5154224+pwright@users.noreply.github.com> Date: Mon, 2 Sep 2024 09:09:11 +0100 Subject: [PATCH] exposing native services (#220) * exposing native services --- cli/podman.adoc | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/cli/podman.adoc b/cli/podman.adoc index c907907..5bd51ef 100644 --- a/cli/podman.adoc +++ b/cli/podman.adoc @@ -274,7 +274,7 @@ This section describes how services can be enabled for a {service-network} for s $ podman run --name backend-target --network skupper --detach --rm -p 8080:8080 quay.io/skupper/hello-world-backend ---- + -This step is not Skupper-specific, that is, this process is unchanged from standard processes for your host. +This step is not Skupper-specific, that is, this process is unchanged from standard processes for your host, for example you might have a native process you want to expose. . Create a service that can communicate on the {service-network}: @@ -305,6 +305,13 @@ NOTE: You can specify more than one port by repeating this option. * `--protocol ` allows you specify the protocol you want to use, `tcp`, `http` or `http2` +If you are exposing a service that is running on the same host as your site that is not a podman container, do not use `localhost`. +Instead, use `host.containers.internal` when exposing local services: + +[source, bash] +---- +skupper expose host host.containers.internal --address backend --port 8080 +---- -- . Create the service on another site in the {service-network}: @@ -355,7 +362,6 @@ For the example deployment in step 1, you create a service using the following c $ skupper service create hello-world-backend 8080 ---- - -- . Bind the service to a cluster service: @@ -428,20 +434,16 @@ $ podman ps -a --format "{{.ID}} {{.Image}} {{.Labels}}" . Make sure you are logged in as the user that created the site: + --- [source, bash] ---- $ skupper status Skupper is enabled for "" with site name "-". ---- --- . Delete the site and all podman resources (containers, volumes and networks) labeled with "application=skupper": + --- [source, bash] ---- $ skupper delete Skupper is now removed for user "". ---- --- \ No newline at end of file