Created
April 2, 2017 18:50
kubernetes-service.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: nginxsvc | |
labels: | |
app: nginx | |
spec: 指定Service中的内容 | |
ports: 映射列表 | |
- port: 80 service的端口 | |
porotocal: TCP 映射的协议类型,支持TCP/UDP | |
targetPort: 80 映射到pod的端口 | |
name: www.baidu.com 该映射的名字 | |
selector: 匹配器 | |
port: 80 | |
app: nginx 匹配label中app为nginx,port为80的pod |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
typo in line 10
also could you tell what this means app: nginx 匹配label中app为nginx,port为80的pod