<p>I'm trying to use this feature: <a href="https://cloud.ibm.com/docs/services/appid?topic=appid-kube-auth#kube-auth" rel="nofollow noreferrer">https://cloud.ibm.com/docs/services/appid?topic=appid-kube-auth#kube-auth</a></p>

<p>I've followed the steps in the documentation, but the authentication process is not triggered. Unfortunately I don't see any errors and don't know what else to do.</p>

<p>Here is my sample service (nginx.yaml):</p>

<pre><code>---
apiVersion: apps/v1 
kind: Deployment
metadata:
  name: nginx
spec:
  strategy:
    type: Recreate
  selector:
    matchLabels:
      app: nginx
  replicas: 3 
  template: 
    metadata:
      labels:
        app: nginx
    spec:
      containers:
      - name: nginx
        image: nginx
        ports:
        - containerPort: 80
---
apiVersion: v1
kind: Service
metadata:
  name: nginx
  namespace: default
  labels:
    app: nginx
spec:
  ports:
  - name: http
    port: 80
    protocol: TCP
  selector:
    app: nginx
  type: NodePort
</code></pre>

<p>Here is my sample service (ingress.yaml). Replace 'niklas-heidloff-4' with your cluster name and 'niklas-heidloff-appid' with the name of your App ID service instance.</p>

<pre><code>apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: ingress-with-app-id
  annotations:   
    ingress.bluemix.net/appid-auth: "bindSecret=binding-niklas-heidloff-appid namespace=default requestType=web"
spec:
  tls:
  - hosts:
    - niklas.niklas-heidloff-4.us-south.containers.appdomain.cloud
    secretName: niklas-heidloff-4
  rules:
  - host: niklas.niklas-heidloff-4.us-south.containers.appdomain.cloud
    http:
      paths:
      - path: /
        backend:
          serviceName: nginx
          servicePort: 80
</code></pre>

<p>Here are the steps to reproduce the sample:</p>

<p>First create a new cluster with at least two worker nodes in Dallas as described in the documentation. Note that it can take some extra time to get a public IP for your cluster.</p>

<p>Then create a App ID service instance.</p>

<p>Then invoke the following commands (replace 'niklas-heidloff-4' with your cluster name):</p>

<pre><code>$ ibmcloud login -a https://api.ng.bluemix.net
$ ibmcloud ks region-set us-south
$ ibmcloud ks cluster-config niklas-heidloff-4 (and execute export....)
$ ibmcloud ks cluster-service-bind --cluster niklas-heidloff-4 --namespace default --service niklas-heidloff-appid
$ kubectl apply -f nginx.yaml
$ kubectl apply -f ingress.yaml
</code></pre>

<p>After this I could open '<a href="https://niklas.niklas-heidloff-4.us-south.containers.appdomain.cloud/" rel="nofollow noreferrer">https://niklas.niklas-heidloff-4.us-south.containers.appdomain.cloud/</a>' but the authentication process is not triggered and the page opens without authentication. </p>

<p>I tried the steps mentioned in the <a href="https://cloud.ibm.com/docs/services/appid?topic=appid-kube-auth#kube-auth" rel="nofollow noreferrer">link</a> and this is how it <strong>worked</strong> for me. </p>

<p><strong>ingress.yaml</strong></p>

<pre><code>apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: myingress
  annotations:
    ingress.bluemix.net/appid-auth: "bindSecret=binding-appid-ks namespace=default requestType=web serviceName=nginx idToken=false"
spec:
  tls:
    - hosts:
        - test.vidya-think-cluster.us-south.containers.appdomain.cloud
      secretName: vidya-think-cluster
  rules:
    - host: test.vidya-think-cluster.us-south.containers.appdomain.cloud
      http:
        paths:
          - path: /
            backend:
              serviceName: nginx
              servicePort: 80
</code></pre>

<p>I added the following web redirect URL in the <code>authentication settings</code> of App ID service - <code>http://test.vidya-think-cluster.us-south.containers.appdomain.cloud/appid_callback</code>.</p>

<p>Now, when you try accessing the app at <code>http://test.vidya-think-cluster.us-south.containers.appdomain.cloud/</code> you should see the redirection to App ID</p>

<p>Looks like <code>idToken=false</code> is a mandatory parameter as there is an error when you run <code>kubectl describe myingress</code> </p>

<p><strong>Error</strong>:  <em>Failed to apply ingress.bluemix.net/appid-auth annotation. Error annotation format error : One of the mandatory fields not valid/missing for annotation ingress.bluemix.net/appid-auth</em></p>
