<p>When i try to connect spinnaker ui after install, i get this error on chrome console <strong>"Uncaught SyntaxError: Unexpected token '&lt;'"</strong> and login form is not loading.</p>

<p>I followed <a href="https://www.digitalocean.com/community/tutorials/how-to-set-up-a-cd-pipeline-with-spinnaker-on-digitalocean-kubernetes" rel="nofollow noreferrer">this</a> tutorial to install spinnaker.</p>

<p>Screenshot at login page with errors
<a href="https://prnt.sc/qe5kwn" rel="nofollow noreferrer">https://prnt.sc/qe5kwn</a></p>

<p>This is my bash file prepared to install spinnaker on kubernetes</p>

<pre><code>MINIO_ACCESS_KEY=samplekey
MINIO_SECRET_KEY=samplesecretkey
MINIO_ADDRESS=http://00000000:9000

KB_NS_NAME=spinnaker
KB_SERVICE_ACCOUNT_NAME=service-ac-v1
HAL_ACCOUNT_NAME=hal-account-v1

hal config provider kubernetes enable

kubectl create ns ${KB_NS_NAME}

kubectl create serviceaccount ${KB_SERVICE_ACCOUNT_NAME} -n ${KB_NS_NAME}

kubectl create clusterrolebinding ${KB_SERVICE_ACCOUNT_NAME} --clusterrole cluster-admin --serviceaccount=spinnaker:${KB_SERVICE_ACCOUNT_NAME}

TOKEN_SECRET=$(kubectl get serviceaccount -n ${KB_NS_NAME} ${KB_SERVICE_ACCOUNT_NAME} -o jsonpath='{.secrets[0].name}')

TOKEN=$(kubectl get secret -n ${KB_NS_NAME} $TOKEN_SECRET -o jsonpath='{.data.token}' | base64 --decode)

kubectl config set-credentials spinnaker-token-user --token $TOKEN

kubectl config set-context --current --user spinnaker-token-user

CONTEXT=$(kubectl config current-context)

hal config provider kubernetes account add ${HAL_ACCOUNT_NAME} --provider-version v2 --context ${CONTEXT}

hal config deploy edit --type distributed --account-name ${HAL_ACCOUNT_NAME}

hal config features edit --artifacts true

hal config storage s3 edit --access-key-id ${MINIO_ACCESS_KEY} --secret-access-key ${MINIO_SECRET_KEY} --endpoint ${MINIO_ADDRESS}

hal config storage edit --type s3

hal config security api edit --override-base-url http://spinnaker-api.abc.com

hal config security ui edit --override-base-url http//spinnaker.abc.com

hal config version edit --version 1.17.5

hal deploy apply
</code></pre>

<p>This is my ingress file to connect ui.</p>

<pre><code>apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
  name: spin-ingress
  namespace: spinnaker
  annotations:
    kubernetes.io/ingress.class: nginx
spec:
  rules:
    - host: spinnaker-api.abc.com
      http:
        paths:
          - backend:
              serviceName: spin-gate
              servicePort: 8084
    - host: spinnaker.abc.com
      http:
        paths:
          - backend:
              serviceName: spin-deck
              servicePort: 9000
</code></pre>

Taha Ergun
<p>I have just solved the problem, it was a url routing rule. </p>

<pre><code>hal config security api edit --override-base-url aaa.com
hal config security ui edit --override-base-url bbb.com
hal deploy apply
</code></pre>
