Skip to main content
Version: v0.14 🚧

network

Schema Network

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

Attributes

nametypedescriptiondefault value
ports[Port]The list of ports which the Workload should get exposed.

Examples

import network as n

"network": n.Network {
ports: [
n.Port {
port: 80
public: True
}
]
}

Schema Port

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

nametypedescriptiondefault value
port requiredintThe exposed port of the Workload.80
protocol required"TCP""UDP"The protocol to access the port.
public requiredboolPublic defines whether the port can be accessed through Internet.False
targetPortintThe backend container port. If empty, set it the same as the port.

Examples

import network as n

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