NOTES.txt 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191
  1. CHART NAME: {{ .Chart.Name }}
  2. CHART VERSION: {{ .Chart.Version }}
  3. APP VERSION: {{ .Chart.AppVersion }}
  4. ** Please be patient while the chart is being deployed **
  5. {{- if .Values.diagnosticMode.enabled }}
  6. The chart has been deployed in diagnostic mode. All probes have been disabled and the command has been overwritten with:
  7. command: {{- include "common.tplvalues.render" (dict "value" .Values.diagnosticMode.command "context" $) | nindent 4 }}
  8. args: {{- include "common.tplvalues.render" (dict "value" .Values.diagnosticMode.args "context" $) | nindent 4 }}
  9. Get the list of pods by executing:
  10. kubectl get pods --namespace {{ .Release.Namespace }} -l app.kubernetes.io/instance={{ .Release.Name }}
  11. Access the pod you want to debug by executing
  12. kubectl exec --namespace {{ .Release.Namespace }} -ti <NAME OF THE POD> -- bash
  13. In order to replicate the container startup scripts execute this command:
  14. For Redis:
  15. /opt/bitnami/scripts/redis/entrypoint.sh /opt/bitnami/scripts/redis/run.sh
  16. {{- if .Values.sentinel.enabled }}
  17. For Redis Sentinel:
  18. /opt/bitnami/scripts/redis-sentinel/entrypoint.sh /opt/bitnami/scripts/redis-sentinel/run.sh
  19. {{- end }}
  20. {{- else }}
  21. {{- if contains .Values.master.service.type "LoadBalancer" }}
  22. {{- if not .Values.auth.enabled }}
  23. {{ if and (not .Values.networkPolicy.enabled) (.Values.networkPolicy.allowExternal) }}
  24. -------------------------------------------------------------------------------
  25. WARNING
  26. By specifying "master.service.type=LoadBalancer" and "auth.enabled=false" you have
  27. most likely exposed the Redis&reg; service externally without any authentication
  28. mechanism.
  29. For security reasons, we strongly suggest that you switch to "ClusterIP" or
  30. "NodePort". As alternative, you can also switch to "auth.enabled=true"
  31. providing a valid password on "password" parameter.
  32. -------------------------------------------------------------------------------
  33. {{- end }}
  34. {{- end }}
  35. {{- end }}
  36. {{- if eq .Values.architecture "replication" }}
  37. {{- if .Values.sentinel.enabled }}
  38. Redis&reg; can be accessed via port {{ .Values.sentinel.service.ports.redis }} on the following DNS name from within your cluster:
  39. {{ template "common.names.fullname" . }}.{{ .Release.Namespace }}.svc.{{ .Values.clusterDomain }} for read only operations
  40. For read/write operations, first access the Redis&reg; Sentinel cluster, which is available in port {{ .Values.sentinel.service.ports.sentinel }} using the same domain name above.
  41. {{- else }}
  42. Redis&reg; can be accessed on the following DNS names from within your cluster:
  43. {{ printf "%s-master.%s.svc.%s" (include "common.names.fullname" .) .Release.Namespace .Values.clusterDomain }} for read/write operations (port {{ .Values.master.service.ports.redis }})
  44. {{ printf "%s-replicas.%s.svc.%s" (include "common.names.fullname" .) .Release.Namespace .Values.clusterDomain }} for read-only operations (port {{ .Values.replica.service.ports.redis }})
  45. {{- end }}
  46. {{- else }}
  47. Redis&reg; can be accessed via port {{ .Values.master.service.ports.redis }} on the following DNS name from within your cluster:
  48. {{ template "common.names.fullname" . }}-master.{{ .Release.Namespace }}.svc.{{ .Values.clusterDomain }}
  49. {{- end }}
  50. {{ if .Values.auth.enabled }}
  51. To get your password run:
  52. export REDIS_PASSWORD=$(kubectl get secret --namespace {{ .Release.Namespace }} {{ template "redis.secretName" . }} -o jsonpath="{.data.redis-password}" | base64 -d)
  53. {{- end }}
  54. To connect to your Redis&reg; server:
  55. 1. Run a Redis&reg; pod that you can use as a client:
  56. kubectl run --namespace {{ .Release.Namespace }} redis-client --restart='Never' {{ if .Values.auth.enabled }} --env REDIS_PASSWORD=$REDIS_PASSWORD {{ end }} --image {{ template "redis.image" . }} --command -- sleep infinity
  57. {{- if .Values.tls.enabled }}
  58. Copy your TLS certificates to the pod:
  59. kubectl cp --namespace {{ .Release.Namespace }} /path/to/client.cert redis-client:/tmp/client.cert
  60. kubectl cp --namespace {{ .Release.Namespace }} /path/to/client.key redis-client:/tmp/client.key
  61. kubectl cp --namespace {{ .Release.Namespace }} /path/to/CA.cert redis-client:/tmp/CA.cert
  62. {{- end }}
  63. Use the following command to attach to the pod:
  64. kubectl exec --tty -i redis-client \
  65. {{- if and (.Values.networkPolicy.enabled) (not .Values.networkPolicy.allowExternal) }}--labels="{{ template "common.names.fullname" . }}-client=true" \{{- end }}
  66. --namespace {{ .Release.Namespace }} -- bash
  67. 2. Connect using the Redis&reg; CLI:
  68. {{- if eq .Values.architecture "replication" }}
  69. {{- if .Values.sentinel.enabled }}
  70. {{ if .Values.auth.enabled }}REDISCLI_AUTH="$REDIS_PASSWORD" {{ end }}redis-cli -h {{ template "common.names.fullname" . }} -p {{ .Values.sentinel.service.ports.redis }}{{ if .Values.tls.enabled }} --tls --cert /tmp/client.cert --key /tmp/client.key --cacert /tmp/CA.cert{{ end }} # Read only operations
  71. {{ if .Values.auth.enabled }}REDISCLI_AUTH="$REDIS_PASSWORD" {{ end }}redis-cli -h {{ template "common.names.fullname" . }} -p {{ .Values.sentinel.service.ports.sentinel }}{{ if .Values.tls.enabled }} --tls --cert /tmp/client.cert --key /tmp/client.key --cacert /tmp/CA.cert{{ end }} # Sentinel access
  72. {{- else }}
  73. {{ if .Values.auth.enabled }}REDISCLI_AUTH="$REDIS_PASSWORD" {{ end }}redis-cli -h {{ printf "%s-master" (include "common.names.fullname" .) }}{{ if .Values.tls.enabled }} --tls --cert /tmp/client.cert --key /tmp/client.key --cacert /tmp/CA.cert{{ end }}
  74. {{ if .Values.auth.enabled }}REDISCLI_AUTH="$REDIS_PASSWORD" {{ end }}redis-cli -h {{ printf "%s-replicas" (include "common.names.fullname" .) }}{{ if .Values.tls.enabled }} --tls --cert /tmp/client.cert --key /tmp/client.key --cacert /tmp/CA.cert{{ end }}
  75. {{- end }}
  76. {{- else }}
  77. {{ if .Values.auth.enabled }}REDISCLI_AUTH="$REDIS_PASSWORD" {{ end }}redis-cli -h {{ template "common.names.fullname" . }}-master{{ if .Values.tls.enabled }} --tls --cert /tmp/client.cert --key /tmp/client.key --cacert /tmp/CA.cert{{ end }}
  78. {{- end }}
  79. {{- if and (.Values.networkPolicy.enabled) (not .Values.networkPolicy.allowExternal) }}
  80. Note: Since NetworkPolicy is enabled, only pods with label {{ template "common.names.fullname" . }}-client=true" will be able to connect to redis.
  81. {{- else }}
  82. To connect to your database from outside the cluster execute the following commands:
  83. {{- if and (eq .Values.architecture "replication") .Values.sentinel.enabled }}
  84. {{- if contains "NodePort" .Values.sentinel.service.type }}
  85. export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
  86. export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ template "common.names.fullname" . }})
  87. {{ if .Values.auth.enabled }}REDISCLI_AUTH="$REDIS_PASSWORD" {{ end }}redis-cli -h $NODE_IP -p $NODE_PORT {{- if .Values.tls.enabled }} --tls --cert /tmp/client.cert --key /tmp/client.key --cacert /tmp/CA.cert{{ end }}
  88. {{- else if contains "LoadBalancer" .Values.sentinel.service.type }}
  89. NOTE: It may take a few minutes for the LoadBalancer IP to be available.
  90. Watch the status with: 'kubectl get svc --namespace {{ .Release.Namespace }} -w {{ template "common.names.fullname" . }}'
  91. export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ template "common.names.fullname" . }} --template "{{ "{{ range (index .status.loadBalancer.ingress 0) }}{{ . }}{{ end }}" }}")
  92. {{ if .Values.auth.enabled }}REDISCLI_AUTH="$REDIS_PASSWORD" {{ end }}redis-cli -h $SERVICE_IP -p {{ .Values.sentinel.service.ports.redis }} {{- if .Values.tls.enabled }} --tls --cert /tmp/client.cert --key /tmp/client.key --cacert /tmp/CA.cert{{ end }}
  93. {{- else if contains "ClusterIP" .Values.sentinel.service.type }}
  94. kubectl port-forward --namespace {{ .Release.Namespace }} svc/{{ template "common.names.fullname" . }} {{ .Values.sentinel.service.ports.redis }}:{{ .Values.sentinel.service.ports.redis }} &
  95. {{ if .Values.auth.enabled }}REDISCLI_AUTH="$REDIS_PASSWORD" {{ end }}redis-cli -h 127.0.0.1 -p {{ .Values.sentinel.service.ports.redis }} {{- if .Values.tls.enabled }} --tls --cert /tmp/client.cert --key /tmp/client.key --cacert /tmp/CA.cert{{ end }}
  96. {{- end }}
  97. {{- else }}
  98. {{- if contains "NodePort" .Values.master.service.type }}
  99. export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
  100. export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ printf "%s-master" (include "common.names.fullname" .) }})
  101. {{ if .Values.auth.enabled }}REDISCLI_AUTH="$REDIS_PASSWORD" {{ end }}redis-cli -h $NODE_IP -p $NODE_PORT {{- if .Values.tls.enabled }} --tls --cert /tmp/client.cert --key /tmp/client.key --cacert /tmp/CA.cert{{ end }}
  102. {{- else if contains "LoadBalancer" .Values.master.service.type }}
  103. NOTE: It may take a few minutes for the LoadBalancer IP to be available.
  104. Watch the status with: 'kubectl get svc --namespace {{ .Release.Namespace }} -w {{ template "common.names.fullname" . }}'
  105. export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ printf "%s-master" (include "common.names.fullname" .) }} --template "{{ "{{ range (index .status.loadBalancer.ingress 0) }}{{ . }}{{ end }}" }}")
  106. {{ if .Values.auth.enabled }}REDISCLI_AUTH="$REDIS_PASSWORD" {{ end }}redis-cli -h $SERVICE_IP -p {{ .Values.master.service.ports.redis }} {{- if .Values.tls.enabled }} --tls --cert /tmp/client.cert --key /tmp/client.key --cacert /tmp/CA.cert{{ end }}
  107. {{- else if contains "ClusterIP" .Values.master.service.type }}
  108. kubectl port-forward --namespace {{ .Release.Namespace }} svc/{{ printf "%s-master" (include "common.names.fullname" .) }} {{ .Values.master.service.ports.redis }}:{{ .Values.master.service.ports.redis }} &
  109. {{ if .Values.auth.enabled }}REDISCLI_AUTH="$REDIS_PASSWORD" {{ end }}redis-cli -h 127.0.0.1 -p {{ .Values.master.service.ports.redis }} {{- if .Values.tls.enabled }} --tls --cert /tmp/client.cert --key /tmp/client.key --cacert /tmp/CA.cert{{ end }}
  110. {{- end }}
  111. {{- end }}
  112. {{- end }}
  113. {{- end }}
  114. {{- include "redis.checkRollingTags" . }}
  115. {{- include "common.warnings.rollingTag" .Values.volumePermissions.image }}
  116. {{- include "common.warnings.rollingTag" .Values.sysctl.image }}
  117. {{- include "redis.validateValues" . }}
  118. {{- if and (eq .Values.architecture "replication") .Values.sentinel.enabled (eq .Values.sentinel.service.type "NodePort") (not .Release.IsUpgrade ) }}
  119. {{- if $.Values.sentinel.service.nodePorts.sentinel }}
  120. No need to upgrade, ports and nodeports have been set from values
  121. {{- else }}
  122. #!#!#!#!#!#!#!# IMPORTANT #!#!#!#!#!#!#!#
  123. YOU NEED TO PERFORM AN UPGRADE FOR THE SERVICES AND WORKLOAD TO BE CREATED
  124. {{- end }}
  125. {{- end }}