infra4talos/apps-helm/samba4/templates/NOTES.txt

26 lines
1.8 KiB
Plaintext
Raw Normal View History

1. Get the application URL by running these commands:
{{- if contains "NodePort" .Values.service.type }}
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "samba4.fullname" . }})
export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
echo smb://$NODE_IP:$NODE_PORT
{{- else if contains "LoadBalancer" .Values.service.type }}
NOTE: It may take a few minutes for the LoadBalancer IP to be available.
You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "samba4.fullname" . }}'
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "samba4.fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
echo smb://$SERVICE_IP:{{ .Values.service.port }}
{{- else if contains "ClusterIP" .Values.service.type }}
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "samba4.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
echo "You will need to ensure samba is not running locally, then you can use smb://127.0.0.1/"
kubectl port-forward $POD_NAME 445:445
You can also access the service inside the cluster directly with smb://{{ include "samba4.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local
{{- end }}
{{ if not .Values.samba.users }}
You have not specified any users to be created, so you will need to create them by hand. Execute the following command and then inside it, the next two :
kubectl exec -it $POD_NAME sh
$ adduser -s /sbin/nologin -h /home/samba -H -D {username}
$ smbpasswd -a {username}
{{- end }}