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

PowerShell: Remove IP Address Assignment Using Bluecat API

$bluecatUri='http://bluecat.kimconnect.com/Services/API' $bluecatUsername='svc-bluecat-api' $bluecatPassword='PASSWORD' $configId=17 $ipv4Address='10.10.162.54' $marker='toBeDeleted-' function confirmation($content,$testValue="I confirm",$maxAttempts=3){ $confirmed=$false; $attempts=0; $content|write-host write-host "Please review…

PowerShell: Find Guest VMs Associated with a Certain Storage Path

# findGuestMvsByStorage.ps1 $storagePath='\\SMBSERVER009' function getAllGuestVms($clusterName){ try{ Import-Module FailoverClusters $clusterName=if($clusterName){ $clustername }else{ (get-cluster).name } $allHyperVHosts={(Get-ClusterNode -Cluster…

WordPress NextGen Gallery Plugin Error

Error Message: Failed to load plugin url: /bitnami/wordpress/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/attach_to_post/static/ngg_attach_to_post_tinymce_plugin.js?ver=3.17 Resolution: Although the root cause hasn't been…