Yandex Cloud
Search
Contact UsGet started
  • Blog
  • Pricing
  • Documentation
  • All Services
  • System Status
    • Featured
    • Infrastructure & Network
    • Data Platform
    • Containers
    • Developer tools
    • Serverless
    • Security
    • Monitoring & Resources
    • ML & AI
    • Business tools
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Customer Stories
    • Gateway to Russia
    • Cloud for Startups
    • Education and Science
  • Blog
  • Pricing
  • Documentation
Yandex project
© 2025 Yandex.Cloud LLC
Yandex Application Load Balancer
  • Getting started
    • Overview
      • Overview
      • Installing Gateway API
        • Gateway
        • HTTPRoute
        • TLSRoute
        • Service for Gateway API
    • Configuring security groups
    • Working with service accounts
    • Creating or updating resources based on a configuration
  • Access management
  • Pricing policy
  • Terraform reference
  • Monitoring metrics
  • Audit Trails events
  • L7 load balancer logs
  • Release notes

In this article:

  • Service
  • ServiceSpec
  • ServicePort
  1. Tools for Managed Service for Kubernetes
  2. Gateway API
  3. Resource configuration
  4. Service for Gateway API

Fields and annotations of the Service resource for the Gateway API

Written by
Yandex Cloud
Updated at April 22, 2025
  • Service
  • ServiceSpec
  • ServicePort

The Service resource represents the Kubernetes service. For the Gateway API, services are backends between which the incoming traffic is distributed within a Managed Service for Kubernetes cluster. Services representing Application Load Balancer backends are specified in the HTTPRoute resource.

Service is a standard Kubernetes resource. Below, you can find the descriptions of the resource fields and annotations the Application Load Balancer tools for Managed Service for Kubernetes interface with. For a full description of the resource configuration, see the Kubernetes documentation.

ServiceService

apiVersion: v1
kind: Service
metadata:
  name: <string>
spec: <ServiceSpec>

Field

Value / Type

Description

apiVersion

v1

This is a required field.

Kubernetes API version.

kind

Service

Resource type

metadata

ObjectMeta

This is a required field.

Resource metadata

metadata.name

string

This is a required field.

Resource name

Do not mistake it for the Application Load Balancer load balancer name.

spec

ServiceSpec

This is a required field.

Resource specification.

Example
apiVersion: v1
kind: Service
metadata:
  name: alb-demo-1
spec:
  selector:
    app: alb-demo-1
  type: NodePort
  ports:
    - name: http
      port: 80
      protocol: TCP
      nodePort: 30081

ServiceSpecServiceSpec

type: NodePort
ports:
  - <ServicePort>
  -

Field

Value or type

Description

type

NodePort

Required.

Service type.

Warning

Kubernetes backend services referenced in Ingress rules (directly or via HttpBackendGroup/GrpcBackendGroup), must be of type NodePort. For more information about this type, see the relevant Kubernetes article.

ports

[]ServicePort

Required.

List of ports where the service is available.

ServicePortServicePort

port: <int32>
name: <string>
protocol: <protocol>
nodePort: <int32>

Field

Value or type

Description

port

int32

Required.
Number of port where the service is available.

You can use this number if you designate a service as a backend:

  • In Ingress: using the spec.rules.http.paths.backend.service.port.number field (see the configuration).
  • In an HttpBackendGroup backend group: using the spec.backends.service.port.number field (see the configuration).

name

string

Port name within the service.

You can use this name if you designate a service as a backend:

  • In Ingress: using the spec.rules.http.paths.backend.service.port.name field (see the configuration).
  • In an HttpBackendGroup backend group: using the spec.backends.service.port.name field (see the configuration).

protocol

TCP

Network protocol for the port. TCP only.

nodePort

int32

Number of the port opened on the cluster nodes on which the service is deployed. The load balancer sends traffic to this port, and Kubernetes forwards the traffic to the service on its port in the port parameter.

Corresponds to the backend port in the Application Load Balancer backend group.

Was the article helpful?

Previous
TLSRoute
Next
Configuring security groups
Yandex project
© 2025 Yandex.Cloud LLC