ComputeBackendService
| Property | Value |
|---|---|
| Google Cloud Service Name | Compute Engine |
| Google Cloud Service Documentation | /compute/docs/ |
| Google Cloud REST Resource Name |
v1.backendServices v1.regionBackendServices |
| Google Cloud REST Resource Documentation |
/compute/docs/reference/rest/v1/backendServices /compute/docs/reference/rest/v1/regionBackendServices |
| Config Connector Resource Short Names | computebackendservice gcpcomputebackendservice gcpcomputebackendservices |
| Config Connector Service Name | compute.googleapis.com |
| Config Connector Resource Fully Qualified Name | computebackendservices.compute.cnrm.cloud.google.com |
| Can Be Referenced by IAMPolicy/IAMPolicyMember | No |
| Config Connector Default Average Reconcile Interval In Seconds | 600 |
ComputeBackendService can manage both global and regional backend services. To manage a global ComputeBackendService use a value of global in
the spec.location field. To manage a regional ComputeBackendService, use a region name in the spec.location field.
Custom Resource Definition Properties
Annotations
| Fields | |
|---|---|
cnrm.cloud.google.com/project-id |
|
Spec
Schema
affinityCookieTtlSec: integer
backend:
- balancingMode: string
capacityScaler: float
description: string
failover: boolean
group:
instanceGroupRef:
external: string
name: string
namespace: string
networkEndpointGroupRef:
external: string
name: string
namespace: string
maxConnections: integer
maxConnectionsPerEndpoint: integer
maxConnectionsPerInstance: integer
maxRate: integer
maxRatePerEndpoint: float
maxRatePerInstance: float
maxUtilization: float
cdnPolicy:
bypassCacheOnRequestHeaders:
- headerName: string
cacheKeyPolicy:
includeHost: boolean
includeHttpHeaders:
- string
includeNamedCookies:
- string
includeProtocol: boolean
includeQueryString: boolean
queryStringBlacklist:
- string
queryStringWhitelist:
- string
cacheMode: string
clientTtl: integer
defaultTtl: integer
maxTtl: integer
negativeCaching: boolean
negativeCachingPolicy:
- code: integer
ttl: integer
serveWhileStale: integer
signedUrlCacheMaxAgeSec: integer
circuitBreakers:
connectTimeout:
nanos: integer
seconds: integer
maxConnections: integer
maxPendingRequests: integer
maxRequests: integer
maxRequestsPerConnection: integer
maxRetries: integer
compressionMode: string
connectionDrainingTimeoutSec: integer
connectionTrackingPolicy:
connectionPersistenceOnUnhealthyBackends: string
enableStrongAffinity: boolean
idleTimeoutSec: integer
trackingMode: string
consistentHash:
httpCookie:
name: string
path: string
ttl:
nanos: integer
seconds: integer
httpHeaderName: string
minimumRingSize: integer
customRequestHeaders:
- string
customResponseHeaders:
- string
description: string
edgeSecurityPolicyRef:
external: string
name: string
namespace: string
enableCdn: boolean
failoverPolicy:
disableConnectionDrainOnFailover: boolean
dropTrafficIfUnhealthy: boolean
failoverRatio: float
healthChecks:
- healthCheckRef:
external: string
name: string
namespace: string
httpHealthCheckRef:
external: string
name: string
namespace: string
iap:
oauth2ClientId: string
oauth2ClientIdRef:
external: string
name: string
namespace: string
oauth2ClientSecret:
value: string
valueFrom:
secretKeyRef:
key: string
name: string
oauth2ClientSecretSha256: string
loadBalancingScheme: string
localityLbPolicies:
- customPolicy:
data: string
name: string
policy:
name: string
localityLbPolicy: string
location: string
logConfig:
enable: boolean
sampleRate: float
networkRef:
external: string
name: string
namespace: string
outlierDetection:
baseEjectionTime:
nanos: integer
seconds: integer
consecutiveErrors: integer
consecutiveGatewayFailure: integer
enforcingConsecutiveErrors: integer
enforcingConsecutiveGatewayFailure: integer
enforcingSuccessRate: integer
interval:
nanos: integer
seconds: integer
maxEjectionPercent: integer
successRateMinimumHosts: integer
successRateRequestVolume: integer
successRateStdevFactor: integer
portName: string
protocol: string
resourceID: string
securityPolicy: string
securityPolicyRef:
external: string
name: string
namespace: string
securitySettings:
clientTLSPolicyRef:
external: string
name: string
namespace: string
subjectAltNames:
- string
sessionAffinity: string
subsetting:
policy: string
timeoutSec: integer
| Fields | |
|---|---|
|
Optional |
Lifetime of cookies in seconds if session_affinity is GENERATED_COOKIE. |
|
Optional |
The set of backends that serve this BackendService. |
|
Optional |
|
|
Optional |
Specifies the balancing mode for this backend. |
|
Optional |
A multiplier applied to the group's maximum servicing capacity. |
|
Optional |
An optional description of this resource. |
|
Optional |
This field designates whether this is a failover backend. |
|
Required* |
Reference to a ComputeInstanceGroup or ComputeNetworkEndpointGroup resource. In case of instance group this defines the list of instances that serve traffic. Member virtual machine instances from each instance group must live in the same zone as the instance group itself. No two backends in a backend service are allowed to use same Instance Group resource. For Network Endpoint Groups this defines list of endpoints. All endpoints of Network Endpoint Group must be hosted on instances located in the same zone as the Network Endpoint Group. Backend services cannot mix Instance Group and Network Endpoint Group backends. When the 'load_balancing_scheme' is INTERNAL, only instance groups are supported. |
|
Optional |
Reference to a ComputeInstanceGroup resource. |
|
Optional |
A reference to an externally managed ComputeInstanceGroup resource. Should be in the format "projects/{{projectID}}/zones/{{zone}}/instanceGroups/{{instanceGroupID}}". |
|
Optional |
The name of a ComputeInstanceGroup resource. |
|
Optional |
The namespace of a ComputeInstanceGroup resource. |
|
Optional |
Reference to a ComputeNetworkEndpointGroup resource. |
|
Optional |
A reference to an externally managed ComputeNetworkEndpointGroup resource. Should be in the format "projects/{project}/zones/{zone}/networkEndpointGroups/{networkEndpointGroup}". |
|
Optional |
The name of a ComputeNetworkEndpointGroup resource. |
|
Optional |
The namespace of a ComputeNetworkEndpointGroup resource. |
|
Optional |
The max number of simultaneous connections for the group. |
|
Optional |
The max number of simultaneous connections that a single backend network endpoint can handle. |
|
Optional |
The max number of simultaneous connections that a single backend instance can handle. |
|
Optional |
The max requests per second (RPS) of the group. |
|
Optional |
The max requests per second (RPS) that a single backend network endpoint can handle. |
|
Optional |
The max requests per second (RPS) that a single backend instance can handle. |
|
Optional |
Used when balancingMode is UTILIZATION. This ratio defines the CPU utilization target for the group. |
|
Optional |
Cloud CDN configuration for this BackendService. |
|
Optional |
Bypass the cache when the specified request headers are matched - e.g. Pragma or Authorization headers. Up to 5 headers can be specified. The cache is bypassed for all cdnPolicy.cacheMode settings. |
|
Optional |
|
|
Required* |
The header field name to match on when bypassing cache. Values are case-insensitive. |
|
Optional |
The CacheKeyPolicy for this CdnPolicy. |
|
Optional |
If true, requests to different hosts will be cached separately. |
|
Optional |
Allows HTTP request headers (by name) to be used in the cache key. |
|
Optional |
|
|
Optional |
Allows HTTP cookies (by name) to be used in the cache key. The name=value pair will be used in the cache key Cloud CDN generates. |
|
Optional |
|
|
Optional |
If true, http and https requests will be cached separately. |
|
Optional |
If true, include query string parameters in the cache key according to query_string_whitelist and query_string_blacklist. If neither is set, the entire query string will be included. If false, the query string will be excluded from the cache key entirely. |
|
Optional |
Names of query string parameters to exclude in cache keys. All other parameters will be included. Either specify query_string_whitelist or query_string_blacklist, not both. '&' and '=' will be percent encoded and not treated as delimiters. |
|
Optional |
|
|
Optional |
Names of query string parameters to include in cache keys. All other parameters will be excluded. Either specify query_string_whitelist or query_string_blacklist, not both. '&' and '=' will be percent encoded and not treated as delimiters. |
|
Optional |
|
|
Optional |
Specifies the cache setting for all responses from this backend. The possible values are: USE_ORIGIN_HEADERS Requires the origin to set valid caching headers to cache content. Responses without these headers will not be cached at Google's edge, and will require a full trip to the origin on every request, potentially impacting performance and increasing load on the origin server. FORCE_CACHE_ALL Cache all content, ignoring any "private", "no-store" or "no-cache" directives in Cache-Control response headers. Warning: this may result in Cloud CDN caching private, per-user (user identifiable) content. CACHE_ALL_STATIC Automatically cache static content, including common image formats, media (video and audio), and web assets (JavaScript and CSS). Requests and responses that are marked as uncacheable, as well as dynamic content (including HTML), will not be cached. If no value is provided for cdnPolicy.cacheMode, it defaults to CACHE_ALL_STATIC. Check the CacheMode enum for the list of possible values. |
|
Optional |
Specifies a separate client (e.g. browser client) maximum TTL. This is used to clamp the max-age (or Expires) value sent to the client. With FORCE_CACHE_ALL, the lesser of client_ttl and default_ttl is used for the response max-age directive, along with a "public" directive. For cacheable content in CACHE_ALL_STATIC mode, client_ttl clamps the max-age from the origin (if specified), or else sets the response max-age directive to the lesser of the client_ttl and default_ttl, and also ensures a "public" cache-control directive is present. If a client TTL is not specified, a default value (1 hour) will be used. The maximum allowed value is 31,622,400s (1 year). |
|
Optional |
Specifies the default TTL for cached content served by this origin for responses that do not have an existing valid TTL (max-age or s-maxage). Setting a TTL of "0" means "always revalidate". The value of defaultTTL cannot be set to a value greater than that of maxTTL, but can be equal. When the cacheMode is set to FORCE_CACHE_ALL, the defaultTTL will overwrite the TTL set in all responses. The maximum allowed value is 31,622,400s (1 year), noting that infrequently accessed objects may be evicted from the cache before the defined TTL. |
|
Optional |
Specifies the maximum allowed TTL for cached content served by this origin. Cache directives that attempt to set a max-age or s-maxage higher than this, or an Expires header more than maxTTL seconds in the future will be capped at the value of maxTTL, as if it were the value of an s-maxage Cache-Control directive. Headers sent to the client will not be modified. Setting a TTL of "0" means "always revalidate". The maximum allowed value is 31,622,400s (1 year), noting that infrequently accessed objects may be evicted from the cache before the defined TTL. |
|
Optional |
Negative caching allows per-status code TTLs to be set, in order to apply fine-grained caching for common errors or redirects. This can reduce the load on your origin and improve end-user experience by reducing response latency. When the cache mode is set to CACHE_ALL_STATIC or USE_ORIGIN_HEADERS, negative caching applies to responses with the specified response code that lack any Cache-Control, Expires, or Pragma: no-cache directives. When the cache mode is set to FORCE_CACHE_ALL, negative caching applies to all responses with the specified response code, and override any caching headers. By default, Cloud CDN will apply the following default TTLs to these status codes: HTTP 300 (Multiple Choice), 301, 308 (Permanent Redirects): 10m HTTP 404 (Not Found), 410 (Gone), 451 (Unavailable For Legal Reasons): 120s HTTP 405 (Method Not Found), 421 (Misdirected Request), 501 (Not Implemented): 60s. These defaults can be overridden in negative_caching_policy. |
|
Optional |
Sets a cache TTL for the specified HTTP status code. negative_caching must be enabled to configure negative_caching_policy. Omitting the policy and leaving negative_caching enabled will use Cloud CDN's default cache TTLs. Note that when specifying an explicit negative_caching_policy, you should take care to specify a cache TTL for all response codes that you wish to cache. Cloud CDN will not apply any default negative caching when a policy exists. |
|
Optional |
|
|
Optional |
The HTTP status code to define a TTL against. Only HTTP status codes 300, 301, 302, 307, 308, 404, 405, 410, 421, 451 and 501 are can be specified as values, and you cannot specify a status code more than once. |
|
Optional |
The TTL (in seconds) for which to cache responses with the corresponding status code. The maximum allowed value is 1800s (30 minutes), noting that infrequently accessed objects may be evicted from the cache before the defined TTL. |
|
Optional |
Serve existing content from the cache (if available) when revalidating content with the origin, or when an error is encountered when refreshing the cache. This setting defines the default "max-stale" duration for any cached responses that do not specify a max-stale directive. Stale responses that exceed the TTL configured here will not be served. The default limit (max-stale) is 86400s (1 day), which will allow stale content to be served up to this limit beyond the max-age (or s-maxage) of a cached response. The maximum allowed value is 604800 (1 week). Set this to zero (0) to disable serve-while-stale. |
|
Optional |
Maximum number of seconds the response to a signed URL request will be considered fresh. After this time period, the response will be revalidated before being served. Defaults to 1hr (3600s). When serving responses to signed URL requests, Cloud CDN will internally behave as though all responses from this backend had a "Cache-Control: public, max-age=[TTL]" header, regardless of any existing Cache-Control header. The actual headers served in responses will not be altered. |
|
Optional |
Settings controlling the circuit breaking behavior for this BackendService. |
|
Optional |
Not supported by proxy. Connect timeout for the backend service. The timeout is the maximum amount of time KCC will wait for the proxy to connect to the backend. |
|
Optional |
Span of time that's a fraction of a second at nanosecond resolution. Must be from 0 to 999,999,999 inclusive. |
|
Required* |
Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. |
|
Optional |
The maximum number of connections to the backend service. If not specified, there is no limit. Not supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true. |
|
Optional |
The maximum number of pending requests allowed to the backend service. If not specified, there is no limit. Not supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true. |
|
Optional |
The maximum number of parallel requests that allowed to the backend service. If not specified, there is no limit. |
|
Optional |
Maximum requests for a single connection to the backend service. This parameter is respected by both the HTTP/1.1 and HTTP/2 implementations. If not specified, there is no limit. Setting this parameter to 1 will effectively disable keep alive. Not supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true. |
|
Optional |
The maximum number of parallel retries allowed to the backend cluster. If not specified, the default is 1. Not supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true. |
|
Optional |
Compress text responses using Brotli or gzip compression, based on the client's Accept-Encoding header. |
|
Optional |
Time for which instance will be drained (not accept new connections, but still work to finish started). |
|
Optional |
Connection Tracking configuration for this BackendService. Connection tracking policy settings are only available for external passthrough Network Load Balancers and internal passthrough Network Load Balancers. connectionTrackingPolicy cannot be specified with haPolicy. |
|
Optional |
Specifies connection persistence when backends are unhealthy. The default value is DEFAULT_FOR_PROTOCOL. If set to DEFAULT_FOR_PROTOCOL, the existing connections persist on unhealthy backends only for connection-oriented protocols (TCP and SCTP) and only if the Tracking Mode is PER_CONNECTION (default tracking mode) or the Session Affinity is configured for 5-tuple. They do not persist for UDP. If set to NEVER_PERSIST, after a backend becomes unhealthy, the existing connections on the unhealthy backend are never persisted on the unhealthy backend. They are always diverted to newly selected healthy backends (unless all backends are unhealthy). If set to ALWAYS_PERSIST, existing connections always persist on unhealthy backends regardless of protocol and session affinity. It is generally not recommended to use this mode overriding the default. For more details, see [Connection Persistence for Network Load Balancing](https://cloud.google.com/load-balancing/docs/network/networklb-backend-service#connection-persistence) and [Connection Persistence for Internal TCP/UDP Load Balancing](https://cloud.google.com/load-balancing/docs/internal#connection-persistence). Check the ConnectionPersistenceOnUnhealthyBackends enum for the list of possible values. |
|
Optional |
Enable Strong Session Affinity for external passthrough Network Load Balancers. This option is not available publicly. |
|
Optional |
Specifies how long to keep a Connection Tracking entry while there is no matching traffic (in seconds). For internal passthrough Network Load Balancers: - The minimum (default) is 10 minutes and the maximum is 16 hours. - It can be set only if Connection Tracking is less than 5-tuple (i.e. Session Affinity is CLIENT_IP_NO_DESTINATION, CLIENT_IP or CLIENT_IP_PROTO, and Tracking Mode is PER_SESSION). For external passthrough Network Load Balancers the default is 60 seconds. This option is not available publicly. |
|
Optional |
Specifies the key used for connection tracking. There are two options: - PER_CONNECTION: This is the default mode. The Connection Tracking is performed as per the Connection Key (default Hash Method) for the specific protocol. - PER_SESSION: The Connection Tracking is performed as per the configured Session Affinity. It matches the configured Session Affinity. For more details, see [Tracking Mode for Network Load Balancing](https://cloud.google.com/load-balancing/docs/network/networklb-backend-service#tracking-mode) and [Tracking Mode for Internal TCP/UDP Load Balancing](https://cloud.google.com/load-balancing/docs/internal#tracking-mode). Check the TrackingMode enum for the list of possible values. |
|
Optional |
Consistent Hash-based load balancing can be used to provide soft session affinity based on HTTP headers, cookies or other properties. This load balancing policy is applicable only for HTTP connections. The affinity to a particular destination host will be lost when one or more hosts are added/removed from the destination service. This field specifies parameters that control consistent hashing. This field is only applicable when localityLbPolicy is set to MAGLEV or RING_HASH. This field is applicable to either: - A regional backend service with the service_protocol set to HTTP, HTTPS, HTTP2 or H2C, and load_balancing_scheme set to INTERNAL_MANAGED. - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED. |
|
Optional |
Hash session affinity settings when using STRONG_COOKIE_AFFINITY or STRONG_HEADER_AFFINITY. |
|
Optional |
Name of the cookie. |
|
Optional |
Path to set for the cookie. |
|
Optional |
Lifetime of the cookie. |
|
Optional |
Span of time that's a fraction of a second at nanosecond resolution. Must be from 0 to 999,999,999 inclusive. |
|
Required* |
Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. |
|
Optional |
The name of the HTTP header field to map onto. Required if the load balancing policy is MAGLEV or RING_HASH and session affinity is STRONG_HEADER_AFFINITY. |
|
Optional |
The minimum ring size. Valid values are between 1 and 4096. Required if the load balancing policy is RING_HASH. |
|
Optional |
Headers that the load balancer adds to proxied requests. See [Creating custom headers](https://cloud.google.com/load-balancing/docs/custom-headers). |
|
Optional |
|
|
Optional |
Headers that the load balancer adds to proxied responses. See [Creating custom headers](https://cloud.google.com/load-balancing/docs/custom-headers). |
|
Optional |
|
|
Optional |
An optional description of this resource. |
|
Optional |
ComputeSecurityPolicyRef is a reference to a ComputeSecurityPolicy. |
|
Optional |
A reference to an externally managed ComputeSecurityPolicy resource. Should be in the format "projects/{{projectID}}/global/securityPolicies/{{name}}". |
|
Optional |
The name of a ComputeSecurityPolicy resource. |
|
Optional |
The namespace of a ComputeSecurityPolicy resource. |
|
Optional |
If true, enables Cloud CDN for the backend service. |
|
Optional |
Requires at least one backend instance group to be defined as a backup (failover) backend. For load balancers that have configurable failover: [Internal passthrough Network Load Balancers](https://cloud.google.com/load-balancing/docs/internal/failover-overview) and [external passthrough Network Load Balancers](https://cloud.google.com/load-balancing/docs/network/networklb-failover-overview). failoverPolicy cannot be specified with haPolicy. |
|
Optional |
This can be set to true only if the protocol is TCP. The default is false. |
|
Optional |
If set to true, connections to the load balancer are dropped when all primary and all backup backend VMs are unhealthy.If set to false, connections are distributed among all primary VMs when all primary and all backup backend VMs are unhealthy. For load balancers that have configurable failover: [Internal passthrough Network Load Balancers](https://cloud.google.com/load-balancing/docs/internal/failover-overview) and [external passthrough Network Load Balancers](https://cloud.google.com/load-balancing/docs/network/networklb-failover-overview). The default is false. |
|
Optional |
The value of the field must be in the range [0, 1]. If the value is 0, the load balancer performs a failover when the number of healthy primary VMs equals zero. For all other values, the load balancer performs a failover when the total number of healthy primary VMs is less than this ratio. For load balancers that have configurable failover: [Internal TCP/UDP Load Balancing](https://cloud.google.com/load-balancing/docs/internal/failover-overview) and [external TCP/UDP Load Balancing](https://cloud.google.com/load-balancing/docs/network/networklb-failover-overview). |
|
Optional |
|
|
Optional |
The health check resources for health checking this ComputeBackendService. Currently at most one health check can be specified, and a health check is required. |
|
Optional |
Reference to a ComputeHealthCheck resource. |
|
Optional |
The URL for the health check that signals autohealing. Allowed value: The `selfLink` field of a `ComputeHealthCheck` resource. |
|
Optional |
Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names |
|
Optional |
Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ |
|
Optional |
Reference to a ComputeHTTPHealthCheck resource. |
|
Optional |
A reference to an externally managed ComputeHTTPHealthCheck resource. Should be in the format "projects/{{projectID}}/global/httpHealthChecks/{{httpHealthCheckID}}". |
|
Optional |
The name of a ComputeHTTPHealthCheck resource. |
|
Optional |
The namespace of a ComputeHTTPHealthCheck resource. |
|
Optional |
The configurations for Identity-Aware Proxy on this resource. |
|
Optional |
OAuth2 client ID to use for the authentication flow. |
|
Optional |
Reference to a ComputeBackendServiceOauth2ClientId. |
|
Optional |
External is the Google OAuth2 Client ID, e.g. `CLIENT_ID.apps.googleusercontent.com` matching the Cloud Asset Inventory Format. |
|
Optional |
Name of the referent. |
|
Optional |
Namespace of the referent. |
|
Optional |
OAuth2 client secret to use for the authentication flow. |
|
Optional |
Value of the field. Cannot be used if 'valueFrom' is specified. |
|
Optional |
Source for the field's value. Cannot be used if 'value' is specified. |
|
Optional |
Reference to a value with the given key in the given Secret in the resource's namespace. |
|
Required* |
Key that identifies the value to be extracted. |
|
Required* |
Name of the Secret to extract a value from. |
|
Optional |
[Output Only] SHA256 hash value for the field oauth2_client_secret above. |
|
Optional |
Specifies the load balancer type. |
|
Optional |
A list of locality load-balancing policies to be used in order of preference. When you use localityLbPolicies, you must set at least one value for either the localityLbPolicies[].policy or the localityLbPolicies[].customPolicy field. localityLbPolicies overrides any value set in the localityLbPolicy field. For an example of how to use this field, see Define a list of preferred policies. Caution: This field and its children are intended for use in a service mesh that includes gRPC clients only. Envoy proxies can't use backend services that have this configuration. |
|
Optional |
|
|
Optional |
The configuration for a custom policy. |
|
Optional |
An optional, arbitrary JSON object with configuration data. |
|
Required* |
The name of a custom policy. |
|
Optional |
The configuration for a predefined policy. |
|
Required* |
The name of a locality load balancing policy. |
|
Optional |
The load balancing algorithm used within the scope of the locality. |
|
Required |
Location of the resource. |
|
Optional |
This field denotes the logging options for the load balancer traffic. |
|
Optional |
This field denotes whether to enable logging for the load balancer traffic. |
|
Optional |
This field defines the log sampling rate. |
|
Optional |
ComputeNetworkRef is a reference to a Google Cloud ComputeNetwork. |
|
Optional |
A reference to an externally managed ComputeNetwork resource. Should be in the format "projects/{{projectID}}/global/networks/{{networkID}}". |
|
Optional |
The name of a ComputeNetwork resource. |
|
Optional |
The namespace of a ComputeNetwork resource. |
|
Optional |
Settings controlling the ejection of unhealthy backend endpoints. |
|
Optional |
The base time that a host is ejected for. The real time is equal to the base ejection time multiplied by the number of times the host has been ejected. |
|
Optional |
Span of time that's a fraction of a second at nanosecond resolution. Must be from 0 to 999,999,999 inclusive. |
|
Required* |
Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. |
|
Optional |
Number of consecutive errors before ejection. |
|
Optional |
Number of consecutive gateway failures before ejection. |
|
Optional |
Percentage of consecutive errors to enforce. |
|
Optional |
Percentage of consecutive gateway failures to enforce. |
|
Optional |
Percentage of success rate to enforce. |
|
Optional |
Time interval between ejection sweep analysis. |
|
Optional |
Span of time that's a fraction of a second at nanosecond resolution. Must be from 0 to 999,999,999 inclusive. |
|
Required* |
Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. |
|
Optional |
Maximum percentage of hosts that can be ejected. |
|
Optional |
Minimum number of hosts for success rate analysis. |
|
Optional |
Minimum request volume for success rate analysis. |
|
Optional |
Standard deviation factor for success rate analysis. |
|
Optional |
A named port on a backend instance group representing the port for communication to the backend VMs in that group. The named port must be [defined on each backend instance group](https://cloud.google.com/load-balancing/docs/backend-service#named_ports). This parameter has no meaning if the backends are NEGs. For internal passthrough Network Load Balancers and external passthrough Network Load Balancers, omit port_name. |
|
Optional |
The protocol this BackendService uses to communicate with backends. Possible values are HTTP, HTTPS, HTTP2, H2C, TCP, SSL, UDP or GRPC. depending on the chosen load balancer or Traffic Director configuration. Refer to the documentation for the load balancers or for Traffic Director for more information. Must be set to GRPC when the backend service is referenced by a URL map that is bound to target gRPC proxy. |
|
Optional |
The ComputeBackendService name. If not given, the metadata.name will be used. |
|
Optional |
The URL of the security policy associated with this backend service. |
|
Optional |
ComputeSecurityPolicyRef is a reference to a ComputeSecurityPolicy. |
|
Optional |
A reference to an externally managed ComputeSecurityPolicy resource. Should be in the format "projects/{{projectID}}/global/securityPolicies/{{name}}". |
|
Optional |
The name of a ComputeSecurityPolicy resource. |
|
Optional |
The namespace of a ComputeSecurityPolicy resource. |
|
Optional |
This field specifies the security settings that apply to this backend service. This field is applicable to a global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED. |
|
Required* |
Reference to a ComputeSecuritySettingsClientTLSPolicy. |
|
Optional |
External is the selfLink of the referent. |
|
Optional |
Name of the referent. |
|
Optional |
Namespace of the referent. |
|
Required* |
Subject Alternative Names. |
|
Required* |
|
|
Optional |
Type of session affinity to use. The default is NONE. Only NONE and HEADER_FIELD are supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true. For more details, see: [Session Affinity](https://cloud.google.com/load-balancing/docs/backend-service#session_affinity). sessionAffinity cannot be specified with haPolicy. |
|
Optional |
subsetting cannot be specified with haPolicy. |
|
Required* |
The subsetting policy. The only supported policy is CONSISTENT_HASH_SUBSETTING. |
|
Optional |
The backend service timeout. |
* Field is required when parent field is specified
Status
Schema
conditions:
- lastTransitionTime: string
message: string
reason: string
status: string
type: string
creationTimestamp: string
fingerprint: string
generatedId: integer
observedGeneration: integer
selfLink: string
| Fields | |
|---|---|
conditions |
Conditions represent the latest available observations of the object's current state. |
conditions[] |
|
conditions[].lastTransitionTime |
Last time the condition transitioned from one status to another. |
conditions[].message |
Human-readable message indicating details about last transition. |
conditions[].reason |
Unique, one-word, CamelCase reason for the condition's last transition. |
conditions[].status |
Status is the status of the condition. Can be True, False, Unknown. |
conditions[].type |
Type is the type of the condition. |
creationTimestamp |
[Output Only] Creation timestamp in RFC3339 text format. |
fingerprint |
Fingerprint of this resource. A hash of the contents stored in this object. |
generatedId |
[Output Only] The unique identifier for the resource. This identifier is defined by the server. |
observedGeneration |
ObservedGeneration is the generation of the resource that was most recently observed by the Config Connector controller. If this is equal to metadata.generation, then that means that the current reported status reflects the most recent desired state of the resource. |
selfLink |
[Output Only] Server-defined URL for the resource. |
Sample YAML(s)
External Load Balancing Backend Service
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
apiVersion: compute.cnrm.cloud.google.com/v1beta1
kind: ComputeBackendService
metadata:
name: computebackendservice-sample-externalloadbalancing
spec:
description: External backend service with cookie-based session affinity.
portName: cookie-cloud
timeoutSec: 30
healthChecks:
- healthCheckRef:
name: computebackendservice-dep-externalloadbalancing
loadBalancingScheme: EXTERNAL
location: global
protocol: HTTPS
affinityCookieTtlSec: 360
connectionDrainingTimeoutSec: 60
securityPolicyRef:
name: computebackendservice-dep-externalloadbalancing
sessionAffinity: GENERATED_COOKIE
customRequestHeaders:
- "Trailer: custom-trailer"
logConfig:
enable: true
sampleRate: 0.5
backend:
- balancingMode: RATE
capacityScaler: 1
description: A network endpoint group serving this backend with all its available capacity, as calculated by number of simultaneous connections.
maxRatePerEndpoint: 10
group:
networkEndpointGroupRef:
name: computebackendservice-dep-externalloadbalancing
---
apiVersion: compute.cnrm.cloud.google.com/v1beta1
kind: ComputeHealthCheck
metadata:
name: computebackendservice-dep-externalloadbalancing
spec:
httpsHealthCheck:
port: 443
location: global
---
apiVersion: compute.cnrm.cloud.google.com/v1beta1
kind: ComputeInstanceGroup
metadata:
name: computebackendservice-dep-externalloadbalancing
spec:
namedPort:
- name: cookie-cloud
port: 8444
zone: us-central1-a
networkRef:
name: computebackendservice-dep-externalloadbalancing
---
apiVersion: compute.cnrm.cloud.google.com/v1beta1
kind: ComputeNetwork
metadata:
name: computebackendservice-dep-externalloadbalancing
spec:
routingMode: GLOBAL
autoCreateSubnetworks: false
---
apiVersion: compute.cnrm.cloud.google.com/v1beta1
kind: ComputeNetworkEndpointGroup
metadata:
name: computebackendservice-dep-externalloadbalancing
spec:
networkRef:
name: computebackendservice-dep-externalloadbalancing
subnetworkRef:
name: computebackendservice-dep-externalloadbalancing
location: us-west1-a
---
apiVersion: compute.cnrm.cloud.google.com/v1beta1
kind: ComputeSecurityPolicy
metadata:
name: computebackendservice-dep-externalloadbalancing
spec:
rule:
- action: deny(403)
priority: 2147483647
match:
versionedExpr: SRC_IPS_V1
config:
srcIpRanges:
- "*"
---
apiVersion: compute.cnrm.cloud.google.com/v1beta1
kind: ComputeSubnetwork
metadata:
name: computebackendservice-dep-externalloadbalancing
spec:
ipCidrRange: 10.2.0.0/16
region: us-west1
networkRef:
name: computebackendservice-dep-externalloadbalancing
Internal Managed Load Balancing Backend Service
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
apiVersion: compute.cnrm.cloud.google.com/v1beta1
kind: ComputeBackendService
metadata:
name: computebackendservice-sample-internalmanagedloadbalancing
spec:
description: Internal managed backend service with Maglev session affinity.
localityLbPolicy: MAGLEV
timeoutSec: 86400
consistentHash:
httpHeaderName: "Hash_String"
healthChecks:
- healthCheckRef:
name: computebackendservice-dep-internalmanagedloadbalancing
loadBalancingScheme: INTERNAL_MANAGED
location: us-east1
protocol: HTTP
connectionDrainingTimeoutSec: 10
sessionAffinity: HEADER_FIELD
circuitBreakers:
connectTimeout:
nanos: 999999999
seconds: 0
maxConnections: 1024
maxPendingRequests: 1024
maxRequests: 1024
maxRequestsPerConnection: 1
maxRetries: 3
logConfig:
enable: false
outlierDetection:
consecutiveGatewayFailure: 5
enforcingConsecutiveErrors: 100
enforcingSuccessRate: 100
successRateMinimumHosts: 5
successRateRequestVolume: 100
baseEjectionTime:
nanos: 999999999
seconds: 29
consecutiveErrors: 5
enforcingConsecutiveGatewayFailure: 0
interval:
nanos: 999999999
seconds: 9
maxEjectionPercent: 10
successRateStdevFactor: 1900
backend:
- balancingMode: RATE
capacityScaler: 0.9
description: An instance group serving this backend with 90% of its capacity, as calculated by requests per second.
maxRate: 10000
group:
instanceGroupRef:
name: computebackendservice-dep-internalmanagedloadbalancing
---
apiVersion: compute.cnrm.cloud.google.com/v1beta1
kind: ComputeHealthCheck
metadata:
name: computebackendservice-dep-internalmanagedloadbalancing
spec:
httpHealthCheck:
port: 80
location: global
---
apiVersion: compute.cnrm.cloud.google.com/v1beta1
kind: ComputeInstanceGroup
metadata:
name: computebackendservice-dep-internalmanagedloadbalancing
spec:
zone: us-east1-c
networkRef:
name: computebackendservice-dep-internalmanagedloadbalancing
---
apiVersion: compute.cnrm.cloud.google.com/v1beta1
kind: ComputeNetwork
metadata:
name: computebackendservice-dep-internalmanagedloadbalancing
spec:
routingMode: REGIONAL
autoCreateSubnetworks: false
Oauth2clientid Backend Service
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
apiVersion: compute.cnrm.cloud.google.com/v1beta1
kind: ComputeBackendService
metadata:
name: computebackendservice-sample-oauth2clientid
spec:
description: Internal managed backend service with Maglev session affinity.
localityLbPolicy: MAGLEV
timeoutSec: 86400
consistentHash:
httpHeaderName: "Hash string"
healthChecks:
- healthCheckRef:
name: computebackendservice-dep-oauth2clientid
loadBalancingScheme: INTERNAL_MANAGED
location: us-east1
protocol: HTTP
connectionDrainingTimeoutSec: 10
sessionAffinity: HEADER_FIELD
circuitBreakers:
connectTimeout:
nanos: 999999999
seconds: 0
maxConnections: 1024
maxPendingRequests: 1024
maxRequests: 1024
maxRequestsPerConnection: 1
maxRetries: 3
logConfig:
enable: false
outlierDetection:
consecutiveGatewayFailure: 5
enforcingConsecutiveErrors: 100
enforcingSuccessRate: 100
successRateMinimumHosts: 5
successRateRequestVolume: 100
baseEjectionTime:
nanos: 999999999
seconds: 29
consecutiveErrors: 5
enforcingConsecutiveGatewayFailure: 0
interval:
nanos: 999999999
seconds: 9
maxEjectionPercent: 10
successRateStdevFactor: 1900
backend:
- balancingMode: RATE
capacityScaler: 0.9
description: An instance group serving this backend with 90% of its capacity, as calculated by requests per second.
maxRate: 10000
group:
instanceGroupRef:
name: computebackendservice-dep-oauth2clientid
iap:
oauth2ClientIdRef:
external: computebackendservice-dep-oauth2clientid
oauth2ClientSecret:
value: "test-secret-value"
---
apiVersion: compute.cnrm.cloud.google.com/v1beta1
kind: ComputeHealthCheck
metadata:
name: computebackendservice-dep-oauth2clientid
spec:
httpHealthCheck:
port: 80
location: global
---
apiVersion: compute.cnrm.cloud.google.com/v1beta1
kind: ComputeInstanceGroup
metadata:
name: computebackendservice-dep-oauth2clientid
spec:
zone: us-east1-c
networkRef:
name: computebackendservice-dep-oauth2clientid
---
apiVersion: compute.cnrm.cloud.google.com/v1beta1
kind: ComputeNetwork
metadata:
name: computebackendservice-dep-oauth2clientid
spec:
routingMode: REGIONAL
autoCreateSubnetworks: false
---
apiVersion: iap.cnrm.cloud.google.com/v1beta1
kind: IAPBrand
metadata:
name: computebackendservice-dep-oauth2clientid
spec:
applicationTitle: "test brand"
supportEmail: "support@example.com"
---
apiVersion: iap.cnrm.cloud.google.com/v1beta1
kind: IAPIdentityAwareProxyClient
metadata:
name: computebackendservice-dep-oauth2clientid
spec:
displayName: "Test Client"
brandRef:
name: computebackendservice-dep-oauth2clientid