|
1 | | -1. Get the application URL by running these commands: |
2 | | -{{- if .Values.ingress.enabled }} |
3 | | -{{- range $host := .Values.ingress.hosts }} |
4 | | - {{- range .paths }} |
5 | | - http{{ if $.Values.ingress.tls }}s{{ end }}://{{ $host.host }}{{ .path }} |
6 | | - {{- end }} |
7 | | -{{- end }} |
8 | | -{{- else if contains "NodePort" .Values.service.type }} |
9 | | - export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "valkey.fullname" . }}) |
10 | | - export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}") |
11 | | - echo http://$NODE_IP:$NODE_PORT |
12 | | -{{- else if contains "LoadBalancer" .Values.service.type }} |
13 | | - NOTE: It may take a few minutes for the LoadBalancer IP to be available. |
14 | | - You can watch its status by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "valkey.fullname" . }}' |
15 | | - export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "valkey.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}") |
16 | | - echo http://$SERVICE_IP:{{ .Values.service.port }} |
17 | | -{{- else if contains "ClusterIP" .Values.service.type }} |
18 | | - export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "valkey.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") |
19 | | - export CONTAINER_PORT=$(kubectl get pod --namespace {{ .Release.Namespace }} $POD_NAME -o jsonpath="{.spec.containers[0].ports[0].containerPort}") |
20 | | - echo "Visit http://127.0.0.1:8080 to use your application" |
21 | | - kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:$CONTAINER_PORT |
22 | | -{{- end }} |
| 1 | +{{/* |
| 2 | + NOTES for Valkey Helm Chart |
| 3 | + This file is rendered after `helm install` / `helm upgrade`. |
| 4 | +*/}} |
| 5 | + |
| 6 | +⭐ Valkey has been deployed! |
| 7 | + |
| 8 | +Release: {{ .Release.Name }} |
| 9 | +Namespace: {{ .Release.Namespace }} |
| 10 | +Chart: {{ .Chart.Name }} {{ .Chart.Version }} |
| 11 | +App version: {{ .Chart.AppVersion }} |
| 12 | + |
| 13 | +Service: {{ include "valkey.fullname" . }} |
| 14 | +Type: {{ .Values.service.type }} |
| 15 | +Port: {{ .Values.service.port }} |
| 16 | + |
| 17 | +1) In-cluster access |
| 18 | + From another Pod: |
| 19 | + $ valkey-cli -h {{ include "valkey.fullname" . }} -p {{ .Values.service.port }} PING |
| 20 | + |
| 21 | +2) Local access via kubectl port-forward |
| 22 | + $ kubectl -n {{ .Release.Namespace }} port-forward svc/{{ include "valkey.fullname" . }} 6379:{{ .Values.service.port }} |
| 23 | + In another terminal: |
| 24 | + $ valkey-cli -h 127.0.0.1 -p 6379 PING |
| 25 | + |
| 26 | +{{ if eq .Values.service.type "LoadBalancer" }} |
| 27 | +3) External access (LoadBalancer) |
| 28 | + $ export SERVICE_IP=$(kubectl -n {{ .Release.Namespace }} get svc {{ include "valkey.fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}') |
| 29 | + $ valkey-cli -h $SERVICE_IP -p {{ .Values.service.port }} PING |
| 30 | +{{ else if eq .Values.service.type "NodePort" }} |
| 31 | +3) External access (NodePort) |
| 32 | + $ export NODE_PORT=$(kubectl -n {{ .Release.Namespace }} get svc {{ include "valkey.fullname" . }} -o jsonpath='{.spec.ports[0].nodePort}') |
| 33 | + $ export NODE_IP=$(kubectl get nodes -o jsonpath='{.items[0].status.addresses[?(@.type=="InternalIP")].address}') |
| 34 | + $ valkey-cli -h $NODE_IP -p $NODE_PORT PING |
| 35 | +{{ end }} |
| 36 | + |
| 37 | +{{ if .Values.auth.enabled }} |
| 38 | +🔐 Authentication is ENABLED (ACL) |
| 39 | +- Provide the username and password from `.auth.aclConfig`. |
| 40 | +- Default user: |
| 41 | + $ valkey-cli -h {{ include "valkey.fullname" . }} -p {{ .Values.service.port }} -a <password> PING |
| 42 | +- Named user: |
| 43 | + $ valkey-cli -h {{ include "valkey.fullname" . }} -p {{ .Values.service.port }} --user <user> -a <password> PING |
| 44 | +{{ else }} |
| 45 | +🔓 Authentication is DISABLED |
| 46 | +- Enable with: `--set auth.enabled=true` and provide `.auth.aclConfig`. |
| 47 | +{{ end }} |
| 48 | + |
| 49 | +✅ Quick test |
| 50 | +$ valkey-cli -h {{ include "valkey.fullname" . }} -p {{ .Values.service.port }}{{ if .Values.auth.enabled }} --user <user> -a <password>{{ end }} |
| 51 | +valkey> SET foo bar |
| 52 | +valkey> GET foo |
| 53 | +"bar" |
| 54 | + |
| 55 | +{{ if .Values.dataStorage.enabled }} |
| 56 | +💾 Persistence |
| 57 | +- A PVC is enabled. To see it: |
| 58 | + $ kubectl -n {{ .Release.Namespace }} get pvc -l app.kubernetes.io/instance={{ .Release.Name }},app.kubernetes.io/name={{ include "valkey.name" . }} |
| 59 | +- Note: `dataStorage.keepPvc={{ .Values.dataStorage.keepPvc }}` controls whether the PVC is kept on uninstall. |
| 60 | +{{ else }} |
| 61 | +💾 Persistence |
| 62 | +- Persistence is DISABLED. Data will not survive Pod restarts. |
| 63 | +- Enable with: `--set dataStorage.enabled=true --set dataStorage.requestedSize=5Gi` (optionally set `dataStorage.className`). |
| 64 | +{{ end }} |
| 65 | + |
| 66 | +🧹 Uninstall |
| 67 | +$ helm -n {{ .Release.Namespace }} uninstall {{ .Release.Name }} |
0 commit comments