Thursday, August 20, 2020

traefik: kubernetes service not found: xyz

Check if the removed application left the ingressroute behind.

$ kubectl delete ingressroute -n ${NAMESPACE} ${INGRESSROUTE_APP}

Tuesday, August 18, 2020

helm3: installing kubeapps over TLS

$ kubectl create ns kubeapps

$ helm install  kubeapps --namespace kubeapps bitnami/kubeapps \

  --set ingress.enabled=true \

  --set ingress.certManager=true \

  --set ingress.hosts[0].name=kubeapps.medogz.com \

  --set ingress.hosts[0].tls=true \

  --set ingress.hosts[0].tlsSecret=kubeapps-tls


2. Create the secret
$ kubectl -n default create secret tls kubeapps-tls -n kubeapps --key=/path/STAR_medogz_com.key --cert=/path/STAR_medogz_com.crt 

3. Get the token to access the kubeapps.medogz.com

$  kubectl get secret $(kubectl get serviceaccount kubeapps-operator -o jsonpath='{.secrets[].name}') -o jsonpath='{.data.token}' -o go-template='{{.data.token | base64decode}}' && echo


4. Access https:/kubeapps.medogz.com

NOTE: After the login, some images will load from external network and the site won't be accessed fully by TLS.

Saturday, August 15, 2020

Lenovo thinkpad x1: How to enable the Keyboard Backlight ?

On the keyboard, the keys that are used to enable or disable the backlight is the Fn + Space bar.

Wednesday, August 5, 2020

kubectl: decode a secret

$ kubectl get secrets  registry-medogz-tls-cert -o yaml | grep " tls.crt: " | cut -d ':' -f 2 | awk '{$1=$1};1' | base64 -d

----BEGIN CERTIFICATE-----
MIIDZjCCAk4CCQDjsgIRiJ4soTANBgkqhkiG9w0BAQsFADB6MQswCQYDVQQGEwJV
UzEWMBQGA1UEBwwNTmV3IEhhbXBzaGlyZTEPMA0GA1UECgwGbWVkb2d6MSEwHwYD
VQQDDBhJTlRFUk1FRElBVEUgbWVkb2d6LmhvbWUxHzAdBgkqhkiG9w0BCQEWEG1l
aXNAbWVkb2d6LmhvbWUwHhcNMjAwODAzMDEzNDMxWhcNMjUwODAzMDEzNDMxWjBw
MQswCQYDVQQGEwJVUzELMAkGA1UECAwCTkgxDzANBgNVBAcMBk5hc2h1YTEUMBIG
Nx5qyZfObKcsTNZpzH+3Ihiu0ax/ScPHSZvAp4FH3AEUK+XWSBg9qU9HP/e15XrI
75GGfw2M7bim+EOnDVii9wEnwKRRSKFJhHmPrWJF2mCyezYx80EsRE5l2djkkpuC
yYbYmyHBGYN3jewpOc1UZAvDJUMJsmVdS9+skRzcMsoppxyI7BMk/2jmlMgm0+7K
X/UsyJ4k3Yd02g==
-----END CERTIFICATE-----