
DennisN.38840 (Customer) asked a question.
I've successfully deployed and tested oauth2-proxy in a Kubernetes cluster following this example: https://kubernetes.github.io/ingress-nginx/examples/auth/oauth-external-auth/, which uses GitHub auth mechanism.
Now I'd like to change it to use OKTA instead, but I can not find any documentation.
The deployment YAML I'm trying is this one:
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
k8s-app: oauth2-proxy
name: oauth2-proxy
namespace: test
spec:
replicas: 1
selector:
matchLabels:
k8s-app: oauth2-proxy
template:
metadata:
labels:
k8s-app: oauth2-proxy
spec:
containers:
- args:
- --provider=oidc
- --email-domain=*
- --upstream=file:///dev/null
- --http-address=0.0.0.0:443
env:
- name: OAUTH2_PROXY_CLIENT_ID
value: XXXXXXXXXXX
- name: OAUTH2_PROXY_CLIENT_SECRET
value: XXXXXXXXXX
* docker run -ti --rm python:3-alpine python -c 'import secrets,base64; print(base64.b64encode(base64.b64encode(secrets.token_bytes(16))));'
- name: OAUTH2_PROXY_COOKIE_SECRET
value: python -c 'import os,base64; print(base64.urlsafe_b64encode(os.urandom(16)).decode())'
image: quay.io/oauth2-proxy/oauth2-proxy:latest
imagePullPolicy: Always
name: oauth2-proxy
ports:
- containerPort: 443
protocol: TCP
Any ideas?

Thank you for Posting on our community foryms, my name is Catalin and I will assist you with this issue.
Resources for this topic can be found below :
https://developer.okta.com/blog/2021/11/08/k8s-api-server-oidc
If this doesn't help, please raise a ticket with "SDK's and Libraries" as we will need more information to render appropriate help.
Have a great day ahead!
I don't believe the OIDC integration is what Dennis was asking about.
I would more look in these topics instead: