This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
kubectl config set-cluster {{ cluster_name }} \ | |
--server=https://{{ Master1 IP address }}:{{ k8s apiserver port }} \ | |
--certificate-authority={{ /path/to/kube-CA.pem }} | |
kubectl config set-credentials {{ user@domain }} \ | |
--auth-provider=azure \ | |
--auth-provider-arg=environment=AzurePublicCloud \ | |
--auth-provider-arg=client-id={{ azure_clientapp_ID }}\ | |
--auth-provider-arg=tenant-id={{ azure_tenant_ID }} \ | |
--auth-provider-arg=apiserver-id={{ azure_webapp_ID }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ------------------- Oauth2_Proxy Ingress ------------------- # | |
apiVersion: extensions/v1beta1 | |
kind: Ingress | |
metadata: | |
name: oauth2-proxy | |
namespace: kube-system | |
annotations: | |
ingress.kubernetes.io/force-ssl-redirect: "true" | |
spec: | |
tls: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ------------------- Dashboard Ingress ------------------- # | |
apiVersion: extensions/v1beta1 | |
kind: Ingress | |
metadata: | |
name: kubernetes-dashboard | |
namespace: kube-system | |
annotations: | |
nginx.ingress.kubernetes.io/auth-url: "https://{{ kubedash_FQDN }}/oauth2/auth" | |
nginx.ingress.kubernetes.io/auth-signin: "https://{{ kubedash_FQDN }}/oauth2/start?rd=https://$host$request_uri$is_args$args" | |
{% if nginx_ingress_image_version is defined and nginx_ingress_image_version is version('0.20.0', '<=') %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ------------------- Oauth2_Proxy Service ------------------- # | |
apiVersion: v1 | |
kind: Service | |
metadata: | |
labels: | |
k8s-app: oauth2-proxy | |
name: oauth2-proxy | |
namespace: kube-system | |
spec: | |
ports: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
kind: ConfigMap | |
apiVersion: v1 | |
metadata: | |
name: self-ca-cert | |
namespace: kube-system | |
data: | |
self-ca.pem: |- | |
-----BEGIN CERTIFICATE----- | |
MIIDejCCAmKgAwIBAgIQHPNx5mx48Y5FGKZBNk7GWjANBgkqhkiG9w0BAQsFADA9 | |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
volumeMounts: | |
- name: self-ca-cert | |
mountPath: /etc/ssl/certs/self-ca.pem | |
subPath: self-ca.pem | |
readOnly: false | |
volumes: | |
- name: self-ca-cert | |
configMap: | |
name: self-ca-cert |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ------------------- OAuth2_Proxy Deployment ------------------- # | |
{% if kube_version is version('v1.16', '>=') %} | |
apiVersion: apps/v1 | |
{% else %} | |
apiVersion: extensions/v1beta1 | |
{% endif %} | |
kind: Deployment | |
metadata: | |
labels: | |
k8s-app: oauth2-proxy |