Skip to main content
Version: v0.9

port

Schema Port

Port defines the exposed port of Service, which can be used to describe how the Service
get accessed.

Attributes

Name and DescriptionTypeDefault ValueRequired
port
The exposed port of the Service.
int80required
targetPort
The backend container port. If empty, set it the same as the port.
intUndefinedoptional
protocol
The protocol to access the port.
"TCP" | "UDP""TCP"required
public
Public defines whether the port can be accessed through Internet.
boolFalserequired

Examples

import catalog.models.schema.v1.workload.network as n

port = n.Port {
port: 80
targetPort: 8080
protocol: "TCP"
public: True
}