Created
July 19, 2019 17:26
-
-
Save ams0/85a1c1f4a0555ce5f9151fd54cb105a6 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| #create a secret with | |
| # kubectl -n cert-manager create secret generic azuredns-config --from-literal=client-secret=<secret> | |
| apiVersion: certmanager.k8s.io/v1alpha1 | |
| kind: ClusterIssuer | |
| metadata: | |
| name: "letsencrypt" | |
| spec: | |
| commonName: "*.dev.cookingwithazure.com" | |
| dnsNames: | |
| - "*.dev.cookingwithazure.com" | |
| acme: | |
| server: https://acme-v02.api.letsencrypt.org/directory | |
| email: "[email protected]" | |
| privateKeySecretRef: | |
| name: "letsencrypt" | |
| dns01: | |
| providers: | |
| - name: azure-dns | |
| domains: | |
| - "*.dev.cookingwithazure.com" | |
| azuredns: | |
| email: "[email protected]" | |
| clientID: "292beaa2-95ec-4fa6-b293-4b4f93c61f72" | |
| clientSecretSecretRef: | |
| name: azuredns-config | |
| key: client-secret | |
| zoneName: cookingwithazure.com # tried hostedZoneName as well | |
| resourceGroupName: dns | |
| subscriptionID: "12c7e9d6-967e-40c8-8b3e-4659a4ada3ef" | |
| tenantID: "72f988bf-86f1-41af-91ab-2d7cd011db47" | |
| --- | |
| kind: Certificate | |
| apiVersion: certmanager.k8s.io/v1alpha1 | |
| metadata: | |
| name: "sslcert-dev-cookingwithazure.com" | |
| spec: | |
| secretName: "sslcert-dev-cookingwithazure.com" | |
| issuerRef: | |
| name: "letsencrypt" | |
| kind: ClusterIssuer | |
| commonName: "*.dev.cookingwithazure.com" | |
| dnsNames: | |
| - "*.dev.cookingwithazure.com" | |
| acme: | |
| config: | |
| - dns01: | |
| provider: azure-dns | |
| domains: | |
| - "*.dev.cookingwithazure.com" | |
| -- | |
| --- | |
| kind: Ingress | |
| apiVersion: extensions/v1beta1 | |
| metadata: | |
| name: "tls-poc" | |
| namespace: default | |
| annotations: | |
| kubernetes.io/ingress.class: nginx | |
| nginx.ingress.kubernetes.io/rewrite-target: "/" | |
| nginx.ingress.kubernetes.io/backend-protocol: "HTTPS" | |
| certmanager.k8s.io/cluster-issuer: letsencrypt | |
| spec: | |
| tls: | |
| - hosts: | |
| - "nginx.dev.cookingwithazure.com" | |
| secretName: sslcert-dev-cookingwithazure.com | |
| rules: | |
| - host: "nginx.dev.cookingwithazure.com" | |
| http: | |
| paths: | |
| - path: "/" | |
| backend: | |
| serviceName: "nginx" | |
| servicePort: 80 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment