kubernets service
2021-01-16 08:15
标签:sel select userspace bsp bash spec ber pvs version service调用的三种工作模式,1.1之后的新版基本都用ipvs 1)userspace : v1.1- 2) iptables:v1.10- 3) ipvs: 1.11+ 如果没安装ipvs会降级到iptables模式 service类型: ExternalName ClusterIP NodePort and LoadBalancer 资源记录: SVN_NAME,NS_NAME,DOMAIN.LTD. svc.cluster.local. 比如redis redis.default.svc.cluster.local. 查看标签 kubectl get pods --show-lables 第一个service yaml文件 为deployment配置service kubernets service 标签:sel select userspace bsp bash spec ber pvs version 原文地址:https://www.cnblogs.com/mjxi/p/13378399.htmlapiVersion: v1
kind: Service
metadata:
name: redis
namespace: default
spec:
selector:
app: redis
role: logstor
clusterIP: 10.97.97.97
type: ClusterIP
ports:
- port: 6379 # service port
targetPort: 6379 #pod port
apiVersion: v1
kind: Service
metadata:
name: myapp
namespace: default
spec:
selector:
app: myapp
release: canary
clusterIP: 10.99.99.99
type: NodePort
ports:
- port: 80 # service port
targetPort: 80 #pod port
nodePort: 30080
上一篇:js实现收藏,首页等功能
下一篇:js中IE和谷歌的常见兼容问题