Ports
Appears in
Section titled “Appears in”.Values.service.$name.ports
Target Selector
Section titled “Target Selector”targetSelector
(string): Define the container to link the porttargetSelector
(empty): Assign the service to the primary container
$port-name
Section titled “$port-name”Define the port dict
Key | service.$name.ports.$port-name |
Type | map |
Required | ✅ |
Helm tpl | ❌ |
Default | {} |
Example
service: service-name: ports: port-name: {}
Define the port that will be exposed by the service
Key | service.$name.ports.$port-name.port |
Type | int |
Required | ✅ |
Helm tpl | ✅ |
Default | unset |
Example
service: service-name: ports: port-name: port: 80
targetPort
Section titled “targetPort”Define the target port (No named ports)
Key | service.$name.ports.$port-name.targetPort |
Type | int |
Required | ❌ |
Helm tpl | ✅ |
Default | (Defaults to port if not set) |
Example
service: service-name: ports: port-name: targetPort: 80
protocol
Section titled “protocol”Define the port protocol Used by the container ports and probes, http and https are converted to tcp where needed
Key | service.$name.ports.$port-name.protocol |
Type | string |
Required | ❌ |
Helm tpl | ✅ |
Default | See default here |
Valid Values:
tcp
udp
http
https
Example
service: service-name: ports: port-name: protocol: tcp
hostPort
Section titled “hostPort”Define the hostPort, should be avoided, unless ABSOLUTELY necessary
Key | service.$name.ports.$port-name.hostPort |
Type | int |
Required | ❌ |
Helm tpl | ✅ |
Default | unset |
Example
service: service-name: ports: port-name: hostPort: 30000
targetSelector
Section titled “targetSelector”Define the container to link this port (Must be on under the pod linked above)
Key | service.$name.ports.$port-name.targetSelector |
Type | string |
Required | ❌ |
Helm tpl | ✅ |
Default | unset |
Example
service: service-name: ports: port-name: targetSelector: some-container
Full Examples
Section titled “Full Examples”Full examples can be found under each service type