Hello Guys, i trying to set up the ory kratos in ...
# ory-selfhosting
r
Hello Guys, i trying to set up the ory kratos in kubernetes using helm chartsI have used the official repo implementation i am facing some issue +++ official repo - https://github.com/ory/k8s/tree/master/helm/charts +++ The error msg is Error: couldn't find key smtpConnectionURI in Secret kratos1/kratos-1658925912 Full logs here.============= helm install -f values.yaml ../kratos -n kratos1 --generate-name NAME: kratos-1658925912 LAST DEPLOYED: Wed Jul 27 124513 2022 NAMESPACE: kratos1 STATUS: deployed REVISION: 1 NOTES: The ORY Kratos HTTP Public API is available via: export POD_NAME=$(kubectl get pods --namespace kratos1 -l "app.kubernetes.io/name=kratos,app.kubernetes.io/instance=kratos-1658925912" -o jsonpath="{.items[0].metadata.name}") echo "Visit http://127.0.0.1:80 to use your application" kubectl port-forward $POD_NAME 80:4433 export KRATOS_PUBLIC_URL=http://127.0.0.1:80/If you have the ORY Kratos CLI installed locally, you can run commands against this endpoint: kratos ... $KRATOS_PUBLIC_URLThe ORY Kratos HTTP Admin API is available via: export POD_NAME=$(kubectl get pods --namespace kratos1 -l "app.kubernetes.io/name=kratos,app.kubernetes.io/instance=kratos-1658925912" -o jsonpath="{.items[0].metadata.name}") echo "Visit http://127.0.0.1:80 to use your application" kubectl port-forward $POD_NAME 80:4434 export KRATOS_ADMIN_URL=http://127.0.0.1:80/If you have the ORY Kratos CLI installed locally, you can run commands against this endpoint: kratos ... $KRATOS_ADMIN_URL---------------------kubectl get all -n kratos1 NAME READY STATUS RESTARTS AGE pod/kratos-1658925912-86b86cc78b-drm6q 0/1 CreateContainerConfigError 0 36s pod/kratos-1658925912-courier-0 0/1 CreateContainerConfigError 0 36sNAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE service/kratos-1658925912-admin ClusterIP 10.106.196.166 <none> 80/TCP 36s service/kratos-1658925912-courier ClusterIP None <none> 80/TCP 36s service/kratos-1658925912-public ClusterIP 10.105.131.93 <none> 80/TCP 36sNAME READY UP-TO-DATE AVAILABLE AGE deployment.apps/kratos-1658925912 0/1 1 0 36sNAME DESIRED CURRENT READY AGE replicaset.apps/kratos-1658925912-86b86cc78b 1 1 0 36sNAME READY AGE statefulset.apps/kratos-1658925912-courier 0/1 36s---------------------kubectl logs pod/kratos-1658925912-86b86cc78b-drm6q -n kratos1Error from server (BadRequest): container "kratos" in pod "kratos-1658925912-86b86cc78b-drm6q" is waiting to start: CreateContainerConfigError---------------kubectl describe pod/kratos-1658925912-86b86cc78b-drm6q -n kratos1 Name: kratos-1658925912-86b86cc78b-drm6q Namespace: kratos1 Priority: 0 Start Time: Wed, 27 Jul 2022 124513 +0000 Labels: app.kubernetes.io/instance=kratos-1658925912 app.kubernetes.io/managed-by=Helm app.kubernetes.io/name=kratos app.kubernetes.io/version=v0.8.0-alpha.3 helm.sh/chart=kratos-0.21.5 pod-template-hash=86b86cc78b Annotations: <none> Status: Pending IP: 172.17.0.43 IPs: IP: 172.17.0.43 Controlled By: ReplicaSet/kratos-1658925912-86b86cc78b Containers: kratos: Container ID: Image: oryd/kratos:v0.8.0-alpha.3 Image ID: Ports: 4434/TCP, 4433/TCP Host Ports: 0/TCP, 0/TCP Command: kratos Args: serve all --config /etc/config/kratos.yaml State: Waiting Reason: CreateContainerConfigError Ready: False Restart Count: 0 Liveness: http-get http//http-admin/health/alive delay=30s timeout=1s period=10s #success=1 #failure=5 Readiness: http-get http//http-admin/health/ready delay=30s timeout=1s period=10s #success=1 #failure=5 Environment: DSN: <set to the key 'dsn' in secret 'kratos-1658925912'> Optional: false SECRETS_DEFAULT: <set to the key 'secretsDefault' in secret 'kratos-1658925912'> Optional: true SECRETS_COOKIE: <set to the key 'secretsCookie' in secret 'kratos-1658925912'> Optional: true SECRETS_CIPHER: <set to the key 'secretsCipher' in secret 'kratos-1658925912'> Optional: true COURIER_SMTP_CONNECTION_URI: <set to the key 'smtpConnectionURI' in secret 'kratos-1658925912'> Optional: false Mounts: /etc/config from kratos-config-volume (ro) /var/run/secrets/kubernetes.io/serviceaccount from kube-api-access-gqhrr (ro) Conditions: Type Status Initialized True Ready False ContainersReady False PodScheduled True Volumes: kratos-config-volume: Type: ConfigMap (a volume populated by a ConfigMap) Name: kratos-1658925912-config Optional: false kube-api-access-gqhrr: Type: Projected (a volume that contains injected data from multiple sources) TokenExpirationSeconds: 3607 ConfigMapName: kube-root-ca.crt ConfigMapOptional: <nil> DownwardAPI: true QoS Class: BestEffort Node-Selectors: <none> Tolerations: node.kubernetes.io/not-ready:NoExecute op=Exists for 300s node.kubernetes.io/unreachable:NoExecute op=Exists for 300s Events: Type Reason Age From Message ---- ------ ---- ---- ------- Normal Scheduled 77s default-scheduler Successfully assigned kratos1/kratos-1658925912-86b86cc78b-drm6q to Normal Pulled 4s (x8 over 74s) kubelet Container image "oryd/kratos:v0.8.0-alpha.3" already present on machine Warning Failed 4s (x8 over 74s) kubelet Error: couldn't find key smtpConnectionURI in Secret kratos1/kratos-1658925912========================= 6:20 kindly guide me to resolve this issue
t
You need to define
smtpConnectionURI
within your Kratos config.
Copy code
courier:
  smtp:
    connection_uri: <smtps://foo:bar@my-smtp-server:1234/>
https://www.ory.sh/docs/kratos/concepts/email-sms#sending-emails-via-smtp
r
yes I got it. Thanks @tall-angle-41306