Skip to main content
Version: v0.13 ๐Ÿšง

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
}