Helm/PhpMyAdmin: Difference between revisions

From Chorke Wiki
Jump to navigation Jump to search
(Created page with " helm repo add bitnami https://charts.bitnami.com/bitnami helm repo update && helm repo list kubectl config get-contexts ==Config== <syntaxhighlight lang="properties"> export KUBECONFIG="${HOME}/.kube/dev-kubeconfig.yaml" export KUBECONFIG="${HOME}/.kube/gcp-kubeconfig.yaml" export KUBECONFIG="${HOME}/.kube/config" </syntaxhighlight> ==Install== {| |valign="top"| <syntaxhighlight lang="bash"> helm show values bitnami/phpmyadmin --version=17.0.0|less helm show values...")
 
Line 103: Line 103:
<syntaxhighlight lang="bash">
<syntaxhighlight lang="bash">
kubectl -n phpmyadmin exec -it svc/phpmyadmin -c phpmyadmin -- mariadb -hhost.minikube.internal -uchorke -p
kubectl -n phpmyadmin exec -it svc/phpmyadmin -c phpmyadmin -- mariadb -hhost.minikube.internal -uchorke -p
kubectl -n phpmyadmin exec -it svc/phpmyadmin -- cat    /opt/bitnami/phpmyadmin/config.inc.php
kubectl -n phpmyadmin exec -it svc/phpmyadmin -- ls -lah /opt/bitnami/phpmyadmin/|grep config
kubectl -n phpmyadmin exec -it svc/phpmyadmin -c phpmyadmin -- bash
kubectl -n phpmyadmin exec -it svc/phpmyadmin -c phpmyadmin -- bash
kubectl -n phpmyadmin exec -it svc/phpmyadmin -- mariadb --help
kubectl -n phpmyadmin exec -it svc/phpmyadmin -- mariadb --help

Revision as of 21:26, 11 November 2024

helm repo add bitnami https://charts.bitnami.com/bitnami
helm repo update && helm repo list
kubectl config get-contexts

Config

export KUBECONFIG="${HOME}/.kube/dev-kubeconfig.yaml"
export KUBECONFIG="${HOME}/.kube/gcp-kubeconfig.yaml"
export KUBECONFIG="${HOME}/.kube/config"

Install

helm show values bitnami/phpmyadmin --version=17.0.0|less
helm show values bitnami/phpmyadmin --version=17.0.9|less
kubectl get ns|grep phpmyadmin
kubectl delete ns   phpmyadmin
kubectl get ns|grep phpmyadmin
kubectl create ns   phpmyadmin

cat <<YML | helm -n phpmyadmin install    phpmyadmin bitnami/phpmyadmin --version=17.0.9 -f -
---
ingress:
  enabled: true
  ingressClassName: nginx
  hostname: mariadb.k8s.local
  path: /
fullnameOverride: phpmyadmin
YML

echo -n password: ;read -s MYSQL_PWD;export MYSQL_PWD;echo
mariadb -hmariadb.k8s.local -p3306 -uacademia academia
mariadb -hmariadb.k8s.local -p3306 -uroot mysql
echo -n password: ;read -s MYSQL_PWD;export MYSQL_PWD;echo
mariadb 'mariadb://[email protected]:3306/academia'
mariadb 'mariadb://[email protected]:3306/mysql'

Uninstall

helm uninstall -n phpmyadmin phpmyadmin
kubectl delete namespace phpmyadmin

Swiss Knife

kubectl -n mariadb run -i --tty --rm mariadb-client --image=alpine --restart=Never -- sh
echo -n password: ;read -s MYSQL_PWD;export MYSQL_PWD; echo
apk --update add --no-cache mariadb-client inetutils-telnet

mariadb -hmariadb.mariadb.svc.cluster.local -uroot academia
mariadb -hmariadb.mariadb.svc -uroot academia
mariadb -hmariadb.mariadb -uroot academia
mariadb -hmariadb -uroot academia

Playground

helm -n phpmyadmin install    phpmyadmin bitnami/phpmyadmin --version=17.0.0
helm -n phpmyadmin upgrade -i phpmyadmin bitnami/phpmyadmin --version=17.0.9
helm show values bitnami/phpmyadmin --version=17.0.9|less

kubectl -n phpmyadmin exec -it svc/phpmyadmin -c phpmyadmin -- mariadb -hhost.minikube.internal -uchorke -p
kubectl -n phpmyadmin exec -it svc/phpmyadmin -- cat     /opt/bitnami/phpmyadmin/config.inc.php
kubectl -n phpmyadmin exec -it svc/phpmyadmin -- ls -lah /opt/bitnami/phpmyadmin/|grep config

kubectl -n phpmyadmin exec -it svc/phpmyadmin -c phpmyadmin -- bash
kubectl -n phpmyadmin exec -it svc/phpmyadmin -- mariadb --help

kubectl config --kubeconfig=${HOME}/.kube/aws-kubeconfig.yaml view --flatten
kubectl config --kubeconfig=${HOME}/.kube/dev-kubeconfig.yaml view --flatten
kubectl config --kubeconfig=${HOME}/.kube/gcp-kubeconfig.yaml view --flatten
kubectl config --kubeconfig=${HOME}/.kube/config view --flatten

kubectl -n phpmyadmin delete all --all
kubectl -n phpmyadmin delete ing --all
kubectl -n phpmyadmin delete sts --all
kubectl -n phpmyadmin delete svc --all
kubectl -n phpmyadmin delete pvc --all
kubectl -n phpmyadmin delete pv  --all

kubectl -n phpmyadmin rollout history deploy phpmyadmin
kubectl -n phpmyadmin rollout restart deploy phpmyadmin
kubectl -n phpmyadmin rollout status  deploy phpmyadmin
kubectl -n phpmyadmin exec -it svc/phpmyadmin -- mariadb --help
kubectl -n phpmyadmin logs -f svc/phpmyadmin -c phpmyadmin
kubectl -n phpmyadmin logs -f svc/phpmyadmin

References