【发布时间】:2019-10-27 00:57:55
【问题描述】:
我想要一个 daemonset-redis,每个节点都有自己的缓存,每个部署 pod 都将与它的本地 daemonset-redis 通信如何实现?如何从 docker-container 中引用同一节点中的 daemonset pod?
更新: 我宁愿不使用服务选项并确保每个 pod 都访问其本地守护程序集
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: redislocal
spec:
selector:
matchLabels:
name: redislocal
template:
metadata:
labels:
name: redislocal
spec:
hostNetwork: true
containers:
- name: redislocal
image: redis:5.0.5-alpine
ports:
- containerPort: 6379
hostPort: 6379
【问题讨论】:
标签: kubernetes daemonset