Difference between revisions of "Kind: Service"
Jump to navigation
Jump to search
Line 2: | Line 2: | ||
* https://kubernetes.io/docs/concepts/services-networking/service/ | * https://kubernetes.io/docs/concepts/services-networking/service/ | ||
[[kind:]] [[Service]] | [[kind:]] [[Service]] | ||
− | + | ||
− | apiVersion: v1 | + | Oficial example: |
− | kind: Service | + | [[apiVersion]]: v1 |
− | metadata: | + | kind: Service |
− | + | metadata: | |
− | spec: | + | name: my-service |
− | + | spec: | |
− | + | selector: | |
− | + | app: MyApp | |
− | + | ports: | |
− | + | - protocol: TCP | |
− | + | port: 80 | |
− | + | targetPort: 9376 | |
Revision as of 10:09, 3 June 2022
kind: Service
Oficial example:
apiVersion: v1 kind: Service metadata: name: my-service spec: selector: app: MyApp ports: - protocol: TCP port: 80 targetPort: 9376
See also
- Kubernetes services,
kubectl get services, kubectl describe service
,kubectl create service
[loadbalancer
|nodeport
|clusterip
|externalname ], kubectl expose
,headless service, service.beta.kubernetes.io
kind:
[Pod | Ingress | ClusterConfiguration
|Config | ConfigMap | ServiceAccount | Deployment | List | Secret | Status ], spec: metadata: data:
Advertising: