Merge pull request #49582 from NareshKoduru/service_copy
Enable copying service contentpull/49589/head
commit
06079e07ce
|
@ -106,19 +106,7 @@ For example, suppose you have a set of Pods that each listen on TCP port 9376
|
||||||
and are labelled as `app.kubernetes.io/name=MyApp`. You can define a Service to
|
and are labelled as `app.kubernetes.io/name=MyApp`. You can define a Service to
|
||||||
publish that TCP listener:
|
publish that TCP listener:
|
||||||
|
|
||||||
```yaml
|
{{% code_sample file="service/simple-service.yaml" %}}
|
||||||
apiVersion: v1
|
|
||||||
kind: Service
|
|
||||||
metadata:
|
|
||||||
name: my-service
|
|
||||||
spec:
|
|
||||||
selector:
|
|
||||||
app.kubernetes.io/name: MyApp
|
|
||||||
ports:
|
|
||||||
- protocol: TCP
|
|
||||||
port: 80
|
|
||||||
targetPort: 9376
|
|
||||||
```
|
|
||||||
|
|
||||||
Applying this manifest creates a new Service named "my-service" with the default
|
Applying this manifest creates a new Service named "my-service" with the default
|
||||||
ClusterIP [service type](#publishing-services-service-types). The Service
|
ClusterIP [service type](#publishing-services-service-types). The Service
|
||||||
|
|
|
@ -0,0 +1,11 @@
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: my-service
|
||||||
|
spec:
|
||||||
|
selector:
|
||||||
|
app.kubernetes.io/name: MyApp
|
||||||
|
ports:
|
||||||
|
- protocol: TCP
|
||||||
|
port: 80
|
||||||
|
targetPort: 9376
|
Loading…
Reference in New Issue