Fix orders of yaml of services-networking/service (#14212)
The orders of kind and metadata were inconsistent, and that made the doc unreadable. This fixes the orders in consistent way in service.mdpull/14225/head
parent
e0cd1ee67d
commit
f952ac106f
|
@ -54,8 +54,8 @@ new instance. For example, suppose you have a set of `Pods` that each expose
|
||||||
port 9376 and carry a label `"app=MyApp"`.
|
port 9376 and carry a label `"app=MyApp"`.
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
kind: Service
|
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
metadata:
|
metadata:
|
||||||
name: my-service
|
name: my-service
|
||||||
spec:
|
spec:
|
||||||
|
@ -103,8 +103,8 @@ abstract other kinds of backends. For example:
|
||||||
In any of these scenarios you can define a service without a selector:
|
In any of these scenarios you can define a service without a selector:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
kind: Service
|
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
metadata:
|
metadata:
|
||||||
name: my-service
|
name: my-service
|
||||||
spec:
|
spec:
|
||||||
|
@ -118,8 +118,8 @@ Because this service has no selector, the corresponding `Endpoints` object will
|
||||||
created. You can manually map the service to your own specific endpoints:
|
created. You can manually map the service to your own specific endpoints:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
kind: Endpoints
|
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
|
kind: Endpoints
|
||||||
metadata:
|
metadata:
|
||||||
name: my-service
|
name: my-service
|
||||||
subsets:
|
subsets:
|
||||||
|
@ -236,8 +236,8 @@ ports you must give all of your ports names, so that endpoints can be
|
||||||
disambiguated. For example:
|
disambiguated. For example:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
kind: Service
|
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
metadata:
|
metadata:
|
||||||
name: my-service
|
name: my-service
|
||||||
spec:
|
spec:
|
||||||
|
@ -427,8 +427,8 @@ information about the provisioned balancer will be published in the `Service`'s
|
||||||
`.status.loadBalancer` field. For example:
|
`.status.loadBalancer` field. For example:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
kind: Service
|
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
metadata:
|
metadata:
|
||||||
name: my-service
|
name: my-service
|
||||||
spec:
|
spec:
|
||||||
|
@ -773,8 +773,8 @@ This Service definition, for example, maps
|
||||||
the `my-service` Service in the `prod` namespace to `my.database.example.com`:
|
the `my-service` Service in the `prod` namespace to `my.database.example.com`:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
kind: Service
|
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
metadata:
|
metadata:
|
||||||
name: my-service
|
name: my-service
|
||||||
namespace: prod
|
namespace: prod
|
||||||
|
@ -811,8 +811,8 @@ In the `ServiceSpec`, `externalIPs` can be specified along with any of the `Serv
|
||||||
In the example below, "`my-service`" can be accessed by clients on "`80.11.12.10:80`" (`externalIP:port`)
|
In the example below, "`my-service`" can be accessed by clients on "`80.11.12.10:80`" (`externalIP:port`)
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
kind: Service
|
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
metadata:
|
metadata:
|
||||||
name: my-service
|
name: my-service
|
||||||
spec:
|
spec:
|
||||||
|
|
Loading…
Reference in New Issue