Posted On October 30, 2021

Kubernetes: Cert-Manager Certificate Request YAML Example

kimconnect 0 comments
blog.KimConnect.com >> Codes , Virtualization >> Kubernetes: Cert-Manager Certificate Request YAML Example
# Set variables
certPrefix=kimconnect
domainName=kimconnect.com
domainName2=www.kimconnect.com
serviceName=kimconnectblog-wordpress
servicePort=8080

# Create a yaml file and create cert with it
cat <<EOF > $certPrefix-cert.yaml
apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
  name: $certPrefix-cert
  namespace: default
  annotations:
    kubernetes.io/ingress.class: "nginx"
    acme.cert-manager.io/http01-edit-in-place: "true"
    kubernetes.io/tls-acme: "true"
spec:
  dnsNames:
    - $domainName
    - $domainName2
  secretName: $certPrefix-cert
  issuerRef:
    name: letsencrypt-prod
    kind: ClusterIssuer
EOF
kubectl create -f $certPrefix-cert.yaml

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Post

Dell OpenManage and ESXi 6.0 Integration

Install OpenManage on ESX 5.1 to 6.0: ----------------------------------------------- Check to see whether OpenManage is already…

PowerShell: Update Windows Computers

There's a more updated version available. <# Update-Windows-Computers-v0.11.ps1 # # Purpose: trigger Microsoft Updates on…

PowerShell: Microsoft SQL Administration

Script to Install Microsoft Clustering Service $proxy="http://proxy:8080"$exclusionList="localhost;*.kimconnect.com"function checkProxy{try{$connectionTest=iwr download.microsoft.com#$connectionSucceeds=Test-NetConnection -Computername download.microsoft.com -Port 443 -InformationLevel Quietif…