[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 # 此处指定暴露至外网的端口