Public services allow your microservices to securely expose public endpoints without opening ports on your agents.
Specifying Public Containers
and microservices, you can specify a
public configuration when
configuring the port mappings of your container.
public is specified, this will open a tunnel that will forward all traffic incoming onto the
port exposed by the container.
Schemes and Protocol
schemes allows you to specify the protocols supported by the underlying exposed microservice.
Controller will generate a public URL for each protocol supported.
protocol lets you decide between
tcp. It tells the public port which type of traffic
to forward. the default value is
http protocol will only work if the schemes are
... name: msvc-1 agent: name: agent-1 container: ... ports: - internal: 80 external: 5000 public: schemes: - https protocol: http ...
The example above would be for a microservice exposing an HTTPS server.
Deploying such a configuration would result in a port being opened on the Controller host, and all
incoming tcp traffic would be tunneled to
agent-1, port 5000.
The public address can be retrieved in the Portal (in the Application details, and/or microservice details pages), or by using edgectl .
Below is the YAML returned when describing the microservice/application.
... name: msvc-1 agent: name: agent-1 container: ... ports: - internal: 80 external: 5000 public: schemes: - https links: - https://<random_string>.http0.cass.edgeworx.io protocol: http ...