%3CLINGO-SUB%20id%3D%22lingo-sub-1579902%22%20slang%3D%22en-US%22%3EDeploy%20a%20WordPress%20app%20using%20Helm%20with%20Azure%20Database%20for%20MySQL%20and%20Azure%20Kubernetes%20Services%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1579902%22%20slang%3D%22en-US%22%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThis%20blog%20post%20shows%20you%20how%20to%20use%20Helm%20chart%20to%20run%20a%20WordPress%20application%20on%20Azure%20Kubernetes%20services(AKS)%20and%20Azure%20Database%20for%20MySQL.%26nbsp%3B%20We%20will%20be%20using%26nbsp%3BBitnami%20WordPress%20helm%20chart%20which%20is%20the%20easiest%20way%20to%20get%20started%20with%20this%20applications%20on%26nbsp%3BKubernetes%20in%20Azure.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId--1295208363%22%20id%3D%22toc-hId--1293606282%22%3EPrerequisites%3C%2FH2%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ETo%20complete%20this%20process%2C%20you%20need%3A%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3EAn%20Azure%20subscription.%20If%20you%20don't%20have%20an%20Azure%20subscription%2C%20you%20can%20create%20a%20%3CA%20href%3D%22https%3A%2F%2Fazure.microsoft.com%2Ffree%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3Efree%20account%3C%2FA%3E.%3C%2FLI%3E%0A%3CLI%3EInstall%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fcli%2Fazure%2Finstall-azure-cli%3Fview%3Dazure-cli-latest%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3EAzure%20CLI%3C%2FA%3E.%3C%2FLI%3E%0A%3CLI%3EInstall%20and%20configure%20Docker%20on%20a%20%3CA%20href%3D%22https%3A%2F%2Fdocs.docker.com%2Fdocker-for-mac%2F%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3EMac%3C%2FA%3E%2C%20%3CA%20href%3D%22https%3A%2F%2Fdocs.docker.com%2Fdocker-for-windows%2F%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3EWindows%3C%2FA%3E%2C%20or%20%3CA%20href%3D%22https%3A%2F%2Fdocs.docker.com%2Fengine%2Finstallation%2F%23supported-platforms%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3ELinux%3C%2FA%3E%20system.%3C%2FLI%3E%0A%3CLI%3EInstall%20%3CA%20href%3D%22https%3A%2F%2Fhelm.sh%2Fdocs%2Fintro%2Finstall%2F%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3EHelm%20v3%3C%2FA%3E.%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CH2%20id%3D%22toc-hId-1192304470%22%20id%3D%22toc-hId-1193906551%22%3ECreate%20a%20Resource%20group%3C%2FH2%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ECreate%20a%20resource%20group%20in%20the%20East%20US%20Azure%20region%20for%20your%20Kubernetes%20cluster%20and%20your%20Azure%20Database%20for%20MySQL%20resources%20by%20running%20the%20following%20command%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%3E%3CSPAN%3Eaz%20group%20create%20%3C%2FSPAN%3E%3CSPAN%3E--name%3C%2FSPAN%3E%20myresourcegroup%20%3CSPAN%3E--location%3C%2FSPAN%3E%20eastus%3C%2FPRE%3E%0A%3CH2%20id%3D%22toc-hId--615149993%22%20id%3D%22toc-hId--613547912%22%3E%26nbsp%3B%3C%2FH2%3E%0A%3CH2%20id%3D%22toc-hId-1872362840%22%20id%3D%22toc-hId-1873964921%22%3ECreate%20an%20Azure%20Kubernetes%20Service%20(AKS)%20cluster%3C%2FH2%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ECreate%20an%20AKS%20cluster%3B%20the%20below%20command%20creates%20an%20AKS%20cluster%20named%20%3CSTRONG%3Emyaks%3C%2FSTRONG%3E%20in%20the%20East%20US%20Azure%20region.%3C%2FP%3E%0A%3CPRE%3E%3CSPAN%3Eaz%20aks%20create%20%3C%2FSPAN%3E%3CSPAN%3E-g%3C%2FSPAN%3E%20myresourcegroup%20%3CSPAN%3E-n%3C%2FSPAN%3E%20myaks%20%3CSPAN%3E--location%3C%2FSPAN%3E%20eastus%20%3CSPAN%3E--generate-ssh-keys%3C%2FSPAN%3E%3C%2FPRE%3E%0A%3CH2%20id%3D%22toc-hId-64908377%22%20id%3D%22toc-hId-66510458%22%3E%26nbsp%3B%3C%2FH2%3E%0A%3CH2%20id%3D%22toc-hId--1742546086%22%20id%3D%22toc-hId--1740944005%22%3EConnect%20to%20your%20AKS%20cluster%3C%2FH2%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ETo%20connect%20to%20the%20Kubernetes%20cluster%20from%20your%20local%20computer%2C%20use%20the%20Kubernetes%20command-line%20client%2C%20known%20as%20%3CA%20href%3D%22https%3A%2F%2Fkubernetes.io%2Fdocs%2Fuser-guide%2Fkubectl%2F%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ekubectl%3C%2FA%3E.%26nbsp%3B%20If%20you%20use%20the%20Azure%20Cloud%20Shell%2C%20%3CSTRONG%3Ekubectl%3C%2FSTRONG%3E%20is%20already%20installed.%20You%20can%20also%20install%20kubectl%20locally%20using%20the%20command%26nbsp%3B%3CSTRONG%3Eaz%20aks%20install-cli.%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CEM%3E%3CSTRONG%3ENote%3C%2FSTRONG%3E%3A%20Make%20sure%20you%20set%20the%20PATH%20environment%20variables%20to%20include%20path%20to%20kubectl%20on%20your%20local%20environment.%3C%2FEM%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ETo%20configure%20%3CSTRONG%3Ekubectl%3C%2FSTRONG%3E%20to%20connect%20to%20your%20Kubernetes%20cluster%2C%20use%20the%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fcli%2Fazure%2Faks%23az-aks-get-credentials%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3Eaz%20aks%20get-credentials%3C%2FA%3E%26nbsp%3Bcommand.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%3E%3CSPAN%3Eaz%20aks%20get-credentials%20%3C%2FSPAN%3E%3CSPAN%3E--resource-group%3C%2FSPAN%3E%20myresourcegroup%20%3CSPAN%3E--name%3C%2FSPAN%3E%20myaks%3C%2FPRE%3E%0A%3CH2%20id%3D%22toc-hId-744966747%22%20id%3D%22toc-hId-746568828%22%3E%26nbsp%3B%3C%2FH2%3E%0A%3CH2%20id%3D%22toc-hId--1062487716%22%20id%3D%22toc-hId--1060885635%22%3ECreate%20a%20MySQL%20database%20with%20Azure%20Database%20for%20MySQL%26nbsp%3B%3C%2FH2%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ECreate%20a%20MySQL%20server%20with%20MySQL%20version%208.0%20in%20your%20resource%20group%20%26nbsp%3Band%20provide%20a%20server%20admin%20login%20%26nbsp%3Band%20a%20strong%20password.%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%3Eaz%20mysql%20server%20create%20--resource-group%20myresourcegroup%20--name%20mydemoserver%26nbsp%3B%20--location%20eastus%20--admin-user%20myadmin%20--admin-password%20%26lt%3Bserver_admin_password%26gt%3B%20--sku-name%20GP_Gen5_2%20--version%208.0%20%26nbsp%3B%20--tags%20'AppProfile%3DWordPress'%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ENow%20we%20create%20the%20database%20by%20running%20the%20following%20command%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%3E%3CSPAN%3Eaz%20mysql%20db%20create%20%3C%2FSPAN%3E--resource-group%20myresourcegroup%20--server-name%20mydemoserver%20%3CSPAN%3E--name%20%3C%2FSPAN%3Ewpdatabase%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ETo%20allow%20your%20AKS%20cluster%20to%20connect%20to%20the%20MySQL%20server%2C%20you%20will%20need%20to%20create%20a%20firewall%20rule%26nbsp%3B%20to%20allow%20all%20Azure-internal%20IP%20addresses%20to%20access%20your%20Server.%20If%20your%20AKS%20cluster%20and%20MySQL%20server%20are%20created%20securely%20in%20a%20virtual%20network%20%2C%20then%20you%20can%20skip%20this%20this%20step.%20For%20simplicity%2C%20we%20are%20not%20using%20virtual%20networks%20in%20this%20example.%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%3E%3CSPAN%3Eaz%20mysql%20server%20firewall-rule%20create%3C%2FSPAN%3E%20--resource-group%20myresourcegroup%20--server-name%20mydemoserver%20%3CSPAN%3E%E2%80%93-name%3C%2FSPAN%3E%20allowazure%20--start-ip-address%200.0.0.0%20--end-ip-address%200.0.0.0%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%20data-unlink%3D%22true%22%3ECreate%20a%20firewall%20rule%20to%20connect%20to%20your%20server%20from%20your%20local%20environment.%20You%20can%20find%20your%20IP%20address%20using%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fwhatismyipaddress.com%2F%22%20target%3D%22_self%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fwhatismyipaddress.com%2F%3C%2FA%3E%20if%20you%20don't%20know%20how%20to%20find%20the%20IP%20address.%26nbsp%3B%3C%2FP%3E%0A%3CP%20data-unlink%3D%22true%22%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%3E%3CSPAN%3Eaz%20mysql%20server%20firewall-rule%20create%3C%2FSPAN%3E%20--resource-group%20myresourcegroup%20--server-name%20mydemoserver%20%3CSPAN%3E%E2%80%93-name%3C%2FSPAN%3E%20allowmyIP%20--start-ip-address%20%26lt%3BYOUR%20IP%20ADDRESS%26gt%3B%20--end-ip-address%20%26lt%3BYOUR%20IP%20ADDRESS%26gt%3B%3C%2FPRE%3E%0A%3CH2%20id%3D%22toc-hId-1425025117%22%20id%3D%22toc-hId-1426627198%22%3E%26nbsp%3B%3C%2FH2%3E%0A%3CH2%20id%3D%22toc-hId--382429346%22%20id%3D%22toc-hId--380827265%22%3EInstalling%20WordPress%3C%2FH2%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EFor%20this%20tutorial%2C%20we%20are%20using%20an%20existing%20%3CA%20href%3D%22https%3A%2F%2Fhub.helm.sh%2Fcharts%2Fbitnami%2Fwordpress%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3EHelm%20Chart%3C%2FA%3E%20for%20WordPress%20built%20by%20Bitnami.%20This%20Bitnami%20helm%20chart%20uses%20local%20MariaDB%20as%20the%20database%20and%20we%20need%20to%20override%20these%20values%20to%20use%20the%20app%20with%20Azure%20Database%20for%20MySQL.%20You%20can%20override%20the%20values%20you%20want%20to%20modify%20with%20a%20custom%20%3CSTRONG%3Evalues.yaml%20%3C%2FSTRONG%3Efile.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ECreate%20a%20new%20directory%20for%20your%20project%20settings%20in%20your%20local%20environment.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%3E%3CSPAN%3Emkdir%20myblog%3CBR%20%2F%3E%3C%2FSPAN%3E%3CSPAN%3Ecd%20myblog%3C%2FSPAN%3E%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ENext%2C%20create%20a%20file%20named%20%3CSTRONG%3Evalues.yaml%20%3C%2FSTRONG%3Eusing%20any%20text%20editor%20of%20your%20choice%3CSPAN%3E.%20%3C%2FSPAN%3EThis%20file%20will%20be%20used%20to%20set%20up%20a%20few%20%26nbsp%3Bparameters%20that%20will%20define%20how%20WordPress%20connects%20to%20the%20database%20and%20some%20additional%20Wordpress%20settings%20like%20sitename%20and%20your%20site%20administrator's%20information.%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ECopy%20the%20%3CSTRONG%3Evalues.yam%3C%2FSTRONG%3El%20file%20below.%20Please%20update%20the%20database%20information%20with%20your%20MySQL%20database%20and%20blog%20Information%20below.%20%3CSTRONG%3EDo%20not%20forget%20to%20disable%20MariaDB%20as%20shown%20in%20the%20final%20section.%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3Evalues.yaml%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%3E%23%23%20Blog%20Info%3CBR%20%2F%3EwordpressUsername%3A%20wpadmin%3CBR%20%2F%3EwordpressPassword%3A%20password%3CBR%20%2F%3EwordpressEmail%3A%20%3CA%20href%3D%22mailto%3Asunny%40example.com%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3Esunny%40example.com%3C%2FA%3E%3CBR%20%2F%3EwordpressFirstName%3A%20Sunny%3CBR%20%2F%3E%3CSPAN%3EwordpressLastName%3A%20%3CBR%20%2F%3E%3C%2FSPAN%3E%3CSPAN%3EwordpressBlogName%3A%20Sunny%E2%80%99s%20Blog!%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FSPAN%3E%3CSPAN%3E%23%23%20Database%20Settings%3CBR%20%2F%3E%3C%2FSPAN%3E%3CSPAN%3EexternalDatabase%3A%3CBR%20%2F%3E%3C%2FSPAN%3E%3CSPAN%3E%26nbsp%3B%20host%3A%20mydemoserver.mysql.database.azure.com%3CBR%20%2F%3E%3C%2FSPAN%3E%3CSPAN%3E%26nbsp%3B%20user%3A%20myadmin%3CBR%20%2F%3E%3C%2FSPAN%3E%3CSPAN%3E%20%20password%3A%20your-server-admin-password%3CBR%20%2F%3E%3C%2FSPAN%3E%3CSPAN%3E%20%20database%3A%20wpdatabase%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FSPAN%3E%3CSPAN%3E%23%23%20Disabling%20MariaDB%3CBR%20%2F%3E%3C%2FSPAN%3E%3CSPAN%3Emariadb%3A%3CBR%20%2F%3E%3C%2FSPAN%3E%3CSPAN%3E%26nbsp%3B%20enabled%3A%20false%3C%2FSPAN%3E%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ENow%20let%E2%80%99s%20execute%20helm%20to%20install%20WordPress.%20The%20following%20command%20tells%20helm%20to%20add%20the%20Bitnami%20Helm%20Chart%20repository%20so%20you%20can%20access%20all%20of%20their%20helm%20charts.%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%3E%3CSPAN%3Ehelm%20repo%20add%20bitnami%20%3C%2FSPAN%3E%3CSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fcharts.bitnami.com%2Fbitnami%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fcharts.bitnami.com%2Fbitnami%3C%2FA%3E%3C%2FSPAN%3E%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EOnce%20we%20have%20access%20to%20the%20Bitnami%20repository%2C%20use%20helm%20to%20install%20the%20WordPress%20chart%20under%20the%20name%20%3CSTRONG%3Emyblog%3C%2FSTRONG%3E%2C%20using%20%3CSTRONG%3Evalues.yaml%3C%2FSTRONG%3E%20as%20configuration%20file%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%3E%3CSPAN%3Ehelm%20install%20--name%20myblog%20-f%20values.yaml%20stable%2Fwordpress%3C%2FSPAN%3E%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThe%20output%20looks%20like%20this%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%3ENAME%3A%20myblog%3CBR%20%2F%3ELAST%20DEPLOYED%3A%20Sun%20Jul%2019%2022%3A57%3A24%202020%3CBR%20%2F%3ENAMESPACE%3A%20default%3CBR%20%2F%3ESTATUS%3A%20deployed%3CBR%20%2F%3EREVISION%3A%201%3CBR%20%2F%3ETEST%20SUITE%3A%20None%3CBR%20%2F%3E%3CBR%20%2F%3ENOTES%3A%3CBR%20%2F%3E**%20Please%20be%20patient%20while%20the%20chart%20is%20being%20deployed%20**%3CBR%20%2F%3ETo%20access%20your%20WordPress%20site%20from%20outside%20the%20cluster%20follow%20the%20steps%20below%3A%3CBR%20%2F%3E%3CBR%20%2F%3EGet%20the%20WordPress%20URL%20by%20running%20these%20commands%3A%3CBR%20%2F%3ENOTE%3A%20It%20may%20take%20a%20few%20minutes%20for%20the%20LoadBalancer%20IP%20to%20be%20available.%3CBR%20%2F%3EWatch%20the%20status%20with%3A%20'kubectl%20get%20svc%20--namespace%20default%20-w%20myblog-wordpress'%3CBR%20%2F%3Eexport%20SERVICE_IP%3D%24(kubectl%20get%20svc%20--namespace%20default%20myblog-wordpress%20--template%20%22%7B%7B%20range%20(index%20.status.loadBalancer.ingress%200)%20%7D%7D%7B%7B.%7D%7D%7B%7B%20end%20%7D%7D%22)%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%20echo%20%22WordPress%20URL%3A%20%3CA%20href%3D%22http%3A%2F%2F%24SERVICE_IP%2F%26quot%3B%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttp%3A%2F%2F%24SERVICE_IP%2F%22%3C%2FA%3E%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%20echo%20%22WordPress%20Admin%20URL%3A%20%3CA%20href%3D%22http%3A%2F%2F%24SERVICE_IP%2Fadmin%26quot%3B%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttp%3A%2F%2F%24SERVICE_IP%2Fadmin%22%3C%2FA%3E%3CBR%20%2F%3E%20Open%20a%20browser%20and%20access%20WordPress%20using%20the%20obtained%20URL.%3CBR%20%2F%3E%3CBR%20%2F%3ELogin%20with%20the%20following%20credentials%20below%20to%20see%20your%20blog%3A%3CBR%20%2F%3E%3CSPAN%3E%26nbsp%3B%20echo%20Username%3A%20wpadmin%3CBR%20%2F%3E%3C%2FSPAN%3E%3CSPAN%3E%26nbsp%3B%20echo%20Password%3A%20%24(kubectl%20get%20secret%20--namespace%20default%20myblog-wordpress%20-o%20jsonpath%3D%22%7B.data.wordpress-password%7D%22%20%7C%20base64%20--decode)%3C%2FSPAN%3E%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CEM%3E%3CSTRONG%3ENote%3C%2FSTRONG%3E%3A%20If%20you%20have%20a%20custom%20Helm%20chart%20for%20your%20WordPress%20app%20%2C%20you%20can%20use%20it%20in%20place%20of%20bitnami%2Fwordpress.%3C%2FEM%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EAfter%20the%20installation%20is%20complete%2C%20a%20service%20named%20%3CSTRONG%3Emyblog-wordpress%3C%2FSTRONG%3E%20is%20created%20within%20your%20Kubernetes%20cluster.%20This%20may%20take%20a%20few%20minutes%20before%20the%20container%20is%20ready%20and%20the%20External-IP%20information%20is%20available.%20To%20check%20the%20status%20of%20this%20service%20and%20retrieve%20its%20external%20IP%20address%2C%20run%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%3E%3CSPAN%3Ekubectl%20get%20services%3C%2FSPAN%3E%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThe%20output%20should%20show%20you%20the%20External%20IP%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%3E%3CSPAN%3ENAME%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20TYPE%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20CLUSTER-IP%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20EXTERNAL-IP%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20PORT(S)%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3BAGE%3CBR%20%2F%3E%3C%2FSPAN%3E%3CSPAN%3Ekubernetes%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20ClusterIP%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%2010.0.0.1%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%3CNONE%3E%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20443%2FTCP%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%2019m%3CBR%20%2F%3E%3C%2FNONE%3E%3C%2FSPAN%3E%3CSPAN%3Emyblog-wordpress%26nbsp%3B%26nbsp%3B%20LoadBalancer%26nbsp%3B%20%26nbsp%3B%3CIPADDRESS%3E%20%3CIPADDRESS%3E%26nbsp%3B%20%3CPORTS%3E%26nbsp%3B%20110s%3C%2FPORTS%3E%3C%2FIPADDRESS%3E%3C%2FIPADDRESS%3E%3C%2FSPAN%3E%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EMake%20a%20note%20of%20the%20external%20IP%20for%20your%20app%20from%20the%20above%20output.%20Now%20you%20can%20browse%20your%20WordPress%20app%20on%20the%20browser%20using%20that%20external%20IP%20address.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThe%20first%20time%20your%20browse%20the%20app%20it%20can%20take%20a%20while%20and%20may%20timeout%20as%20it%20is%20completing%20the%20WordPress%20installation.%20The%20deployment%20can%20take%20a%20few%20minutes%20to%20refresh%20again%20after%205%20mins%20to%20see%20the%20site%20up%20and%20running%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22mk_sunitha_1-1597107314745.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F211682i0E58D175B8E55D1A%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20title%3D%22mk_sunitha_1-1597107314745.png%22%20alt%3D%22mk_sunitha_1-1597107314745.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThis%20was%20your%20first%20WordPress%20app%20deployment%20on%20Azure%20using%20AKS%20and%20Azure%20Database%20for%20MySQL.%20Happy%20Helming%20with%20Azure%20Kubernetes%20Services%20and%20Azure%20Database%20for%20MySQL%20!%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId--383445838%22%20id%3D%22toc-hId--516114070%22%20id%3D%22toc-hId--514511989%22%3EFeedback%3C%2FH2%3E%0A%3CP%3EWe%20are%20constantly%20looking%20at%20ways%20to%20improve%20our%20service%20and%20prioritize%20highly%20requested%20items.%20If%20you%20have%20any%20feedback%2C%20you%20can%20use%26nbsp%3B%3CA%20style%3D%22background-color%3A%20%23ffffff%3B%22%20href%3D%22https%3A%2F%2Ffeedback.azure.com%2Fforums%2F597982-azure-database-for-mysql%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3EUserVoice%20.%3C%2FA%3E%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId-1971398763%22%20id%3D%22toc-hId-1973000844%22%3E%26nbsp%3B%3C%2FH2%3E%0A%3CH2%20id%3D%22toc-hId--517130562%22%20id%3D%22toc-hId-163944300%22%20id%3D%22toc-hId-165546381%22%3EQuestions%3C%2FH2%3E%0A%3CP%3EIf%20our%20documentation%20fails%20to%20provide%20clarity%2C%20we%20encourage%20customers%20to%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CA%20href%3D%22mailto%3AAskAzureDBforMySQL%40service.microsoft.com%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Econtact%20us%3C%2FA%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Ewith%20questions.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId-1970382271%22%20id%3D%22toc-hId--1643510163%22%20id%3D%22toc-hId--1641908082%22%3ESupport%3C%2FH2%3E%0A%3CP%3EFor%20support%20with%20an%20existing%20Azure%20Database%20for%20MySQL%20server%2C%20use%20the%20Azure%20portal%20to%20open%20a%20support%20request%20with%20us.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-TEASER%20id%3D%22lingo-teaser-1579902%22%20slang%3D%22en-US%22%3E%3CP%3EIn%20this%20blog%20post%2C%20you%20will%20use%26nbsp%3BHelm%26nbsp%3Bfor%20setting%20up%26nbsp%3BWordPress%26nbsp%3Bon%20top%20of%20a%26nbsp%3BKubernetes%20cluster%20with%20MySQL%20in%20Azure.%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22mk_sunitha_1-1597107314745.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F211682i0E58D175B8E55D1A%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20title%3D%22mk_sunitha_1-1597107314745.png%22%20alt%3D%22mk_sunitha_1-1597107314745.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-TEASER%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1579902%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EAzure%20Database%20for%20MySQL%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EAzure%20Kubernetes%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3Ewordpress%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Microsoft

 

This blog post shows you how to use Helm chart to run a WordPress application on Azure Kubernetes services(AKS) and Azure Database for MySQL.  We will be using Bitnami WordPress helm chart which is the easiest way to get started with this applications on Kubernetes in Azure.

 

Prerequisites

 

To complete this process, you need:

Create a Resource group

 

Create a resource group in the East US Azure region for your Kubernetes cluster and your Azure Database for MySQL resources by running the following command:

 

az group create --name myresourcegroup --location eastus

 

Create an Azure Kubernetes Service (AKS) cluster

 

Create an AKS cluster; the below command creates an AKS cluster named myaks in the East US Azure region.

az aks create -g myresourcegroup -n myaks --location eastus --generate-ssh-keys

 

Connect to your AKS cluster

 

To connect to the Kubernetes cluster from your local computer, use the Kubernetes command-line client, known as kubectl.  If you use the Azure Cloud Shell, kubectl is already installed. You can also install kubectl locally using the command az aks install-cli.

 

Note: Make sure you set the PATH environment variables to include path to kubectl on your local environment.

 

To configure kubectl to connect to your Kubernetes cluster, use the az aks get-credentials command.

 

az aks get-credentials --resource-group myresourcegroup --name myaks

 

Create a MySQL database with Azure Database for MySQL 

 

Create a MySQL server with MySQL version 8.0 in your resource group  and provide a server admin login  and a strong password. 

 

az mysql server create --resource-group myresourcegroup --name mydemoserver  --location eastus --admin-user myadmin --admin-password <server_admin_password> --sku-name GP_Gen5_2 --version 8.0   --tags 'AppProfile=WordPress'

 

Now we create the database by running the following command:

 

az mysql db create --resource-group myresourcegroup --server-name mydemoserver --name wpdatabase

 

To allow your AKS cluster to connect to the MySQL server, you will need to create a firewall rule  to allow all Azure-internal IP addresses to access your Server. If your AKS cluster and MySQL server are created securely in a virtual network , then you can skip this this step. For simplicity, we are not using virtual networks in this example. 

 

az mysql server firewall-rule create --resource-group myresourcegroup --server-name mydemoserver –-name allowazure --start-ip-address 0.0.0.0 --end-ip-address 0.0.0.0

 

Create a firewall rule to connect to your server from your local environment. You can find your IP address using https://whatismyipaddress.com/ if you don't know how to find the IP address. 

 

az mysql server firewall-rule create --resource-group myresourcegroup --server-name mydemoserver –-name allowmyIP --start-ip-address <YOUR IP ADDRESS> --end-ip-address <YOUR IP ADDRESS>

 

Installing WordPress

 

For this tutorial, we are using an existing Helm Chart for WordPress built by Bitnami. This Bitnami helm chart uses local MariaDB as the database and we need to override these values to use the app with Azure Database for MySQL. You can override the values you want to modify with a custom values.yaml file.

 

Create a new directory for your project settings in your local environment.

 

mkdir myblog
cd myblog

 

Next, create a file named values.yaml using any text editor of your choice. This file will be used to set up a few  parameters that will define how WordPress connects to the database and some additional Wordpress settings like sitename and your site administrator's information. 

 

Copy the values.yaml file below. Please update the database information with your MySQL database and blog Information below. Do not forget to disable MariaDB as shown in the final section.

 

values.yaml

 

## Blog Info
wordpressUsername: wpadmin
wordpressPassword: password
wordpressEmail: sunny@example.com
wordpressFirstName: Sunny
wordpressLastName:
wordpressBlogName: Sunny’s Blog!

## Database Settings
externalDatabase:
  host: mydemoserver.mysql.database.azure.com
  user: myadmin
password: your-server-admin-password
database: wpdatabase

## Disabling MariaDB
mariadb:
  enabled: false

 

Now let’s execute helm to install WordPress. The following command tells helm to add the Bitnami Helm Chart repository so you can access all of their helm charts. 

 

helm repo add bitnami https://charts.bitnami.com/bitnami

 

Once we have access to the Bitnami repository, use helm to install the WordPress chart under the name myblog, using values.yaml as configuration file:

 

helm install --name myblog -f values.yaml stable/wordpress

 

The output looks like this

 

NAME: myblog
LAST DEPLOYED: Sun Jul 19 22:57:24 2020
NAMESPACE: default
STATUS: deployed
REVISION: 1
TEST SUITE: None

NOTES:
** Please be patient while the chart is being deployed **
To access your WordPress site from outside the cluster follow the steps below:

Get the WordPress URL by running these commands:
NOTE: It may take a few minutes for the LoadBalancer IP to be available.
Watch the status with: 'kubectl get svc --namespace default -w myblog-wordpress'
export SERVICE_IP=$(kubectl get svc --namespace default myblog-wordpress --template "{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}")
   echo "WordPress URL: http://$SERVICE_IP/"
   echo "WordPress Admin URL: http://$SERVICE_IP/admin"
Open a browser and access WordPress using the obtained URL.

Login with the following credentials below to see your blog:
  echo Username: wpadmin
  echo Password: $(kubectl get secret --namespace default myblog-wordpress -o jsonpath="{.data.wordpress-password}" | base64 --decode)

 

Note: If you have a custom Helm chart for your WordPress app , you can use it in place of bitnami/wordpress.

 

After the installation is complete, a service named myblog-wordpress is created within your Kubernetes cluster. This may take a few minutes before the container is ready and the External-IP information is available. To check the status of this service and retrieve its external IP address, run:

 

kubectl get services

 

The output should show you the External IP

 

NAME                   TYPE           CLUSTER-IP     EXTERNAL-IP        PORT(S)       AGE
kubernetes             ClusterIP      10.0.0.1            <none>              443/TCP            19m
myblog-wordpress   LoadBalancer   <IPAddress> <IPAddress>  <ports>  110s

 

Make a note of the external IP for your app from the above output. Now you can browse your WordPress app on the browser using that external IP address.

 

The first time your browse the app it can take a while and may timeout as it is completing the WordPress installation. The deployment can take a few minutes to refresh again after 5 mins to see the site up and running 

 

mk_sunitha_1-1597107314745.png

 

 

Checkout this article to optimize your MySQL server for WordPress workloads. 

 

This was your first WordPress app deployment on Azure using AKS and Azure Database for MySQL. Happy Helming with Azure Kubernetes Services and Azure Database for MySQL !

 

Feedback

We are constantly looking at ways to improve our service and prioritize highly requested items. If you have any feedback, you can use UserVoice .

 

Questions

If our documentation fails to provide clarity, we encourage customers to contact us with questions.

 

Support

For support with an existing Azure Database for MySQL server, use the Azure portal to open a support request with us.