Helm-Redis

[root@master ~]# helm repo add bitnami https://charts.bitnami.com/bitnami
[root@master ~]# helm repo update
[root@master ~]# helm search repo redis
[root@master ~]# helm search repo redis -l
# redis 6.2.7
[root@master ~]# helm pull bitnami/redis --version 16.13.2
[root@master ~]# tar -xf redis-16.13.2.tgz
[root@master ~]# cd redis/
[root@master redis]# ll
total 188
-rw-r--r-- 1 root root    220 Jul  5  2022 Chart.lock
drwxr-xr-x 3 root root     20 Feb 16 11:24 charts
-rw-r--r-- 1 root root    773 Jul  5  2022 Chart.yaml
drwxr-xr-x 2 root root     66 Feb 16 11:24 img
-rw-r--r-- 1 root root 100904 Jul  5  2022 README.md
drwxr-xr-x 5 root root   4096 Feb 16 11:24 templates
-rw-r--r-- 1 root root   4483 Jul  5  2022 values.schema.json
-rw-r--r-- 1 root root  68562 Jul  5  2022 values.yaml


[root@master redis]# vim values.yaml
[root@master redis]# helm install redis . -n redis

添加路由

  • 新建 IngressRouteTCP 资源
apiVersion: traefik.containo.us/v1alpha1
kind: IngressRouteTCP
metadata:
  name: redis
  namespace: redis
spec:
  entryPoints:
  - redis
  routes:
  - match: HostSNI(`*`)
    services:
    - name: redis-master
      port: 6379
  • 在traefik中添加路由

缺点:traefik更新会丢失在线添加的路由
优点:即添加即生效,不会影响其他路由的访问

$ kubectl edit deployments.apps -n kube-system traefik

spec:
  template:
	spec:
      containers:
      - args:
				- --entrypoints.redis.address=:6379			# 此处指定暴露至外网的端口
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值