Pustaka Taratsa

Baca teks (EPUB): Minikube: Install PVC MySQL dan Wordpress

1 bagian

Teks ini diambil langsung dari berkas EPUB; tata letak dan gambar tidak disertakan. Untuk tampilan lengkap, silakan merujuk pada dokumen asli.

Daftar isi
  1. Minikube: Install PVC MySQL dan Wordpress
  2. Objectif
  3. Download
  4. Kustomization.yaml
  5. Apply & Verify
  6. Referensi

Minikube: Install PVC MySQL dan Wordpress

Sumber: https://onnocenter.or.id/wiki/index.php/Minikube:_Install_PVC_MySQL_dan_Wordpress

Sumber: https://kubernetes.io/docs/tutorials/stateful-application/mysql-wordpress-persistent-volume/

Objectif

  • Create PersistentVolumeClaims and PersistentVolumes
  • Create a kustomization.yaml with
    • a Secret generator
    • MySQL resource configs
    • WordPress resource configs
  • Apply the kustomization directory by kubectl apply -k ./
  • Clean up

Download

cd ~
mkdir TEST
wget https://kubernetes.io/examples/application/wordpress/mysql-deployment.yaml
wget https://kubernetes.io/examples/application/wordpress/wordpress-deployment.yaml

Kustomization.yaml

Buat password

cd ~/TEST
vi kustomization.yaml
secretGenerator:
- name: mysql-pass
  literals:
  - password=123456



Download MySQL deployment configuration file

cd ~/TEST
curl -LO https://k8s.io/examples/application/wordpress/mysql-deployment.yaml

Download WordPress configuration file

cd ~/TEST
curl -LO https://k8s.io/examples/application/wordpress/wordpress-deployment.yaml



Tambahkan ke kustomization.yaml

resources:
  - mysql-deployment.yaml
  - wordpress-deployment.yaml

Apply & Verify

cd ~/TEST
kubectl apply -k ./



Verify Secret

kubectl get secrets

Verify PresistenceVolume

kubectl get pvc

Verify pods

kubectl get pods

Cek Service

kubectl get services wordpress
minikube service wordpress --url



Buka URL di Browser

Referensi