[{"content":"","date":null,"permalink":"/categories/","section":"Categories","summary":"","title":"Categories"},{"content":"","date":null,"permalink":"/tags/helm/","section":"Tags","summary":"","title":"Helm"},{"content":"Helm with an OCI repository #Deploying a Helm chart from a OCI repository like Harbor. In this example we will deploy a cert-manager chart using a Harbor repository.\nAdd Helm Repo #helm repo add jetstack https://charts.jetstack.io Fetch Helm Chart #helm fetch jetstack/cert-manager --version v1.12.1 Login to local Harbor Repo #helm registry login harbor.example.com Upload Helm Chart #helm push cert-manager-v1.12.1.tgz oci://harbor.example.com/helm_repo Deploy Helm Chart #helm install cert-manager oci://harbor.example.com/helm-repo/cert-manager \\ --version v1.12.1 \\ --create-namespace \\ --namespace cert-manager \\ --set installCRDs=true ","date":"7 June 2023","permalink":"/posts/helm-oci-repository/","section":"Posts","summary":"","title":"Helm with an OCI repository"},{"content":"","date":null,"permalink":"/categories/kubernetes/","section":"Categories","summary":"","title":"Kubernetes"},{"content":"","date":null,"permalink":"/tags/kubernetes/","section":"Tags","summary":"","title":"Kubernetes"},{"content":"Here I keep al my public documentation, please feel free to browse around.\nYou can find more of me on:\nMastodon\nGithub\nLinkedin\n","date":null,"permalink":"/","section":"Linux, Kubernetes and more....","summary":"","title":"Linux, Kubernetes and more...."},{"content":"","date":null,"permalink":"/posts/","section":"Posts","summary":"","title":"Posts"},{"content":"","date":null,"permalink":"/tags/","section":"Tags","summary":"","title":"Tags"},{"content":"","date":null,"permalink":"/tags/rancher/","section":"Tags","summary":"","title":"Rancher"},{"content":"System Upgrade Controller #Introduction #This project aims to provide a general-purpose, Kubernetes-native upgrade controller (for nodes). It introduces a new CRD, the Plan, for defining any and all of your upgrade policies/requirements. A Plan is an outstanding intent to mutate nodes in your cluster.\nGithub #https://github.com/rancher/system-upgrade-controller\nInstallation (with kustomize) #kustomize build github.com/rancher/system-upgrade-controller | kubectl apply -f - Example Upgrade OpenSUSE Leap Controlplane nodes. #--- apiVersion: v1 kind: Secret metadata: name: leap-update-script namespace: system-upgrade type: Opaque stringData: update.sh: | #!/bin/bash set -e zypper up -y # It is important to check if reboot if needed otherwise you will get in a reboot loop. zypper needs-rebooting; REBOOT=$? zypper ps | grep \u0026#34;You may wish to restart these processes\u0026#34;; REBOOT_PS=$? if [ \u0026#34;$REBOOT\u0026#34; == \u0026#34;1\u0026#34; ] || [ \u0026#34;$REBOOT_PS\u0026#34; == \u0026#34;1\u0026#34; ]; then reboot fi --- apiVersion: upgrade.cattle.io/v1 kind: Plan metadata: name: leap-update namespace: system-upgrade spec: concurrency: 1 nodeSelector: matchExpressions: - { key: node-role.kubernetes.io/control-plane, operator: Exists } tolerations: - { key: node-role.kubernetes.io/control-plane, effect: NoSchedule, operator: Exists, } - { key: node-role.kubernetes.io/etcd, effect: NoExecute, operator: Exists } serviceAccountName: system-upgrade secrets: - name: leap-update-script path: /host/run/system-upgrade/secrets/leap-update-script drain: force: true version: \u0026#34;1\u0026#34; upgrade: image: registry.opensuse.org/opensuse/leap:latest command: [\u0026#34;chroot\u0026#34;, \u0026#34;/host\u0026#34;] args: [\u0026#34;sh\u0026#34;, \u0026#34;/run/system-upgrade/secrets/leap-update-script/update.sh\u0026#34;] Example Upgrade Ubuntu Worker Node #--- apiVersion: v1 kind: Secret metadata: name: ubuntu-update-script namespace: system-upgrade type: Opaque stringData: update.sh: | #!/bin/sh set -e apt-get update apt-get upgrade -y # It is important to check if reboot if needed otherwise you will get in a reboot loop. if [ -f /var/run/reboot-required ]; then reboot fi --- apiVersion: upgrade.cattle.io/v1 kind: Plan metadata: name: ubuntu-update namespace: system-upgrade spec: concurrency: 1 nodeSelector: matchExpressions: - { key: node-role.kubernetes.io/worker, operator: Exists } serviceAccountName: system-upgrade secrets: - name: ubuntu-update-script path: /host/run/system-upgrade/secrets/ubuntu-update-script drain: force: true version: focal upgrade: image: ubuntu command: [\u0026#34;chroot\u0026#34;, \u0026#34;/host\u0026#34;] args: [\u0026#34;sh\u0026#34;, \u0026#34;/run/system-upgrade/secrets/ubuntu-update-script/update.sh\u0026#34;] ","date":"16 May 2023","permalink":"/posts/system-upgrade-controller/","section":"Posts","summary":"","title":"System Upgrade Controller"},{"content":"Cert-manager with cloudflare for automatic TLS certificates #Configuration files for configuration of cert-manager to fully automatic get certificates for application in Kubernetes.\nInstallation of cert-manager:\nStatic Install\nkubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/v1.8.2/cert-manager.yaml More information: https://cert-manager.io/docs/installation/\nInstallation of ClusterIssuer with secret for api keys:\nissuer.yaml\napiVersion: cert-manager.io/v1 kind: ClusterIssuer metadata: name: letsencrypt-cloudflare-issuer spec: acme: email: \u0026lt;email\u0026gt; server: https://acme-v02.api.letsencrypt.org/directory privateKeySecretRef: name: letsencrypt-key solvers: - dns01: cloudflare: apiTokenSecretRef: name: cloudflare-api-token-secret key: api-token issuer-secret.yaml\napiVersion: v1 kind: Secret metadata: name: cloudflare-api-token-secret namespace: cert-manager type: Opaque stringData: api-token: \u0026lt;token\u0026gt; Get the certificate\ncertificate.yaml\napiVersion: cert-manager.io/v1 kind: Certificate metadata: name: tls-ingress-certificate namespace: \u0026lt;namespace\u0026gt; spec: dnsNames: - \u0026#34;host.domainname.tld\u0026#34; secretName: tls-ingress-certificate issuerRef: name: letsencrypt-cloudflare-issuer kind: ClusterIssuer Get more information\nkubectl -n cert-manager describe clusterissuers.cert-manager.io kubectl -n \u0026lt;namespace\u0026gt; get certificaterequests.cert-manager.io kubectl -n \u0026lt;namespace\u0026gt; get orders.acme.cert-manager.io kubectl -n \u0026lt;namespace\u0026gt; describe orders.acme.cert-manager.io \u0026lt;order\u0026gt; kubectl -n \u0026lt;namespace\u0026gt; get events ","date":"16 May 2023","permalink":"/posts/cert-manager-cloudflare/","section":"Posts","summary":"","title":"Cert Manager Cloudflare"},{"content":"","date":null,"permalink":"/tags/tls/","section":"Tags","summary":"","title":"TLS"},{"content":"About me\u0026hellip;\n","date":"1 January 0001","permalink":"/about/","section":"Linux, Kubernetes and more....","summary":"","title":""}]