小编Ore*_*ari的帖子

如何从同一节点中的另一个 pod 与 daemonset pod 通信?

我想要一个 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

Run Code Online (Sandbox Code Playgroud)

kubernetes daemonset

8
推荐指数
1
解决办法
2497
查看次数

标签 统计

daemonset ×1

kubernetes ×1