ID and Tokendnspod-webhook-values.yaml:groupName: example.your.domain # Enter a custom group namesecrets: # Paste the generated ID and token belowapiID: "<ID>"apiToken: "<Token>"clusterIssuer:enabled: true # Automatically create a ClusterIssueremail: your@email.com # Enter your email address
git clone --depth 1 https://github.com/qqshfox/cert-manager-webhook-dnspod.githelm upgrade --install -n cert-manager -f dnspod-webhook-values.yaml cert-manager-webhook-dnspod ./cert-manager-webhook-dnspod/deploy/cert-manager-webhook-dnspod
Certificate object to issue a free certificate:apiVersion: cert-manager.io/v1kind: Certificatemetadata:name: example-com-crtnamespace: istio-systemspec:secretName: example-com-crt-secret # The certificate is stored in this secretissuerRef:name: cert-manager-webhook-dnspod-cluster-issuer # The automatically generated ClusterIssuer is used herekind: ClusterIssuergroup: cert-manager.iodnsNames: # Enter the list of domain names for which to issue certificates. Ensure that all the domain names are managed by DNSPod- example.com- test.example.com
READY, the certificate is successfully issued:$ kubectl -n istio-system get certificates.cert-manager.ioNAME READY SECRET AGEexample-com-crt True example-com-crt-secret 25d
describe to view the cause:kubectl -n istio-system describe certificates.cert-manager.io example-com-crt
Secret as follows:apiVersion: networking.k8s.io/v1beta1kind: Ingressmetadata:name: test-ingressannotations:kubernetes.io/ingress.class: nginxspec:rules:- host: test.example.comhttp:paths:- path: /backend:serviceName: webservicePort: 80tls:hosts:- test.example.comsecretName: example-com-crt-secret # Reference the certificate secret
apiVersion: networking.istio.io/v1alpha3kind: Gatewaymetadata:name: example-gwnamespace: istio-systemspec:selector:app: istio-ingressgatewayistio: ingressgatewayservers:- port:number: 80name: HTTP-80protocol: HTTPhosts:- example.com- test.example.comtls:httpsRedirect: true # Forcibly redirect HTTP to HTTPS- port:number: 443name: HTTPS-443protocol: HTTPShosts:- example.com- test.example.comtls:mode: SIMPLEcredentialName: example-com-crt-secret # Reference the certificate secret---apiVersion: networking.istio.io/v1beta1kind: VirtualServicemetadata:name: example-vsnamespace: testspec:gateways:- istio-system/example-gw # Bind the forwarding rule to the ingress gateway to open the service to the public networkhosts:- 'test.example.com'http:- route:- destination:host: exampleport:number: 80
フィードバック