Skip to content

Ever wondered what happens when the power of Kubernetes collides with the creativity of WordPress? Brace yourself for the future of web development—introducing kustomization, your gateway to deploying WordPress websites with intergalactic precision.

Notifications You must be signed in to change notification settings

mdazfar2/k8s-wordpress-deploy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 

Repository files navigation

Deploy WordPress with Kubernetes -

Firstly we use Kustomization file in Kubernetes are used to declare resources and customizations. The kustomization.yaml file is a specification of resources plus customizations, and it is used to declare the manifests you want to change and how you want to change them.

  • In the above repo, you will find the YAML code for kustomization, and within the kustomization, there are two more YAML files called 'mysql-wordpress.yml' and 'wordpress-deployment.yml'.

when you are add both of the code with repective yaml file name then run the below commands step by step -

  1. To create the kustomization file, you have to use this command👇

    kubectl create -k .
    • This command will automatically check whether the kustomization file is available or not. If it is available, the kustomization file will be run automatically.
  2. After creating the kustomization file, many more clusters are run because we are adding too many clusters in the kustomization. So, if you want to check them all, use the commands step by step.

    kubectl get svc
    • It will show the services is created or note if created then all good.
  3. To check the deploy

    kubectl get deploy
    • There two deploy will shown called "wordpress" & "wordpress-mysql"
  4. To check the replicaSet

    kubectl get rs
    • Also, two ReplicaSets will be shown, but you have to wait until the status of all the ReplicaSets becomes 'run.
  5. To check the pods

    kubectl get pods
    • When the status of the replicaSet is ready then you have to get two pods when the pods is also ready then you are good to go..
  6. To check the Secrets

    kubectl get secret
    • It allows you to retrieve information about a secret. By default, the command does not display the contents of a secret. This is to protect the secret from being exposed accidentally or from being stored in a terminal log
  7. To check PersistentVolumeClaim

    kubectl get pvc
    • It is a request for a specific amount of storage from a persistent volume and when it is available then it you get PersistentVolume.
  8. To check PersistentVolume

    kubectl get pv
    • It is a piece of storage in a Kubernetes cluster that is provisioned and managed by the cluster’s administrator. It is a way to separate storage from the actual pod that needs it.
  9. To get port using services

    kubectl get svc
    • You will get wordpress and wordpress-mysql remember that you have to use port of the wordpress when you will get it on.
  10. It's time to deploy your wordpress using ip

    minikube ip
    • After using this command, you will get the IP address. Once you get the IP, use the same IP in your browser, attaching the port which you will get from the 'svc' command.
  • Now, congratulations! ✨ You have completed deploying your WordPress. Enjoy your WordPress journey! 😊

    If you are facing any issues then feel free to message me on - LinkedIn or Discord

About

Ever wondered what happens when the power of Kubernetes collides with the creativity of WordPress? Brace yourself for the future of web development—introducing kustomization, your gateway to deploying WordPress websites with intergalactic precision.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published