<p>I'm developing an app (Springboot) where i use my own Oauth autorization server, this server is deployed in AWS, but i want my app to be deployed in a kubernetes environment. The thing is that after creating a pod with my app image and a service for the pod i'm struggling with the oauth authentication. I have an enviroment variable defined for a production profile which sets the redirect url (<a href="http://localhost:8002/module" rel="nofollow noreferrer">http://localhost:8002/module</a>) but this url is not correct now. The redirect should be done to the minikube machine  and then proxy it to the minikube ip and the service assigned port. Is there anyway to achieve this? What approach should i follow?</p>

<p>The pod:</p>

<pre><code>apiVersion: v1
kind: Pod
metadata:
  name: tmanager-module-webapp
  labels:
    version: beta
    release: "Beta"
spec:
  containers:
  - name: module
    image: tmanager-module
    imagePullPolicy: "Never"
</code></pre>

<p>And the service:</p>

<pre><code>kind: Service
apiVersion: v1
metadata:
  name: tmanager-module-webapp
spec:
  selector:
    version: beta
  ports:
    - name: http
      port: 8002
      nodePort: 30080
  type: NodePort
</code></pre>

<p>Thanks in advance</p>

txomin
<p>I solve it using the kubernetes port forward, but i had to point the deployment instead of the service <a href="https://kubernetes.io/docs/tasks/access-application-cluster/port-forward-access-application-cluster/" rel="nofollow noreferrer">https://kubernetes.io/docs/tasks/access-application-cluster/port-forward-access-application-cluster/</a> that way i could access the target machine and port and point the oauth redirection to it. Independently of the pod ip and port.</p>
