您好,登錄后才能下訂單哦!
這篇文章主要講解了“Helm部署服務(wù)的方法是什么”,文中的講解內(nèi)容簡單清晰,易于學(xué)習(xí)與理解,下面請(qǐng)大家跟著小編的思路慢慢深入,一起來研究和學(xué)習(xí)“Helm部署服務(wù)的方法是什么”吧!
首先,我們需要添加 WordPress 官方Repo地址:
helm3 repo add bitnami https://charts.bitnami.com/bitnami
執(zhí)行 Helm Install
部署 WordPress:
helm3 install wordpress bitnami/wordpress \ --set mariadb.primary.persistence.enabled=true \ --set mariadb.primary.persistence.storageClass=alicloud-disk-ssd \ --set mariadb.primary.persistence.size=20Gi \ --set persistence.enabled=false
其中:
為了實(shí)現(xiàn)數(shù)據(jù)的持久化,mariadb 使用持久化存儲(chǔ)卷保存數(shù)據(jù);
持久化存儲(chǔ)選用阿里云 ssd 云盤,大小為 20Gi,并通過配置 StorageClassName 自動(dòng)化創(chuàng)建;
WordPress 不需要進(jìn)行數(shù)據(jù)持久化,數(shù)據(jù)卷選項(xiàng)可配置為 false
執(zhí)行成功后,應(yīng)該有如下返回:
NAME: wordpressLAST DEPLOYED: Wed Jan 20 15:09:45 2021NAMESPACE: handsonackSTATUS: deployedREVISION: 1NOTES:** Please be patient while the chart is being deployed **Your WordPress site can be accessed through the following DNS name from within your cluster: wordpress.handsonack.svc.cluster.local (port 80)To access your WordPress site from outside the cluster follow the steps below:1. 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 handsonack -w wordpress' export SERVICE_IP=$(kubectl get svc --namespace handsonack wordpress --template "{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}") echo "WordPress URL: http://$SERVICE_IP/" echo "WordPress Admin URL: http://$SERVICE_IP/admin"2. Open a browser and access WordPress using the obtained URL.3. Login with the following credentials below to see your blog: echo Username: user echo Password: $(kubectl get secret --namespace handsonack wordpress -o jsonpath="{.data.wordpress-password}" | base64 --decode)
也可以通過以下命令查看部署狀態(tài):
helm3 status wordpress
感謝各位的閱讀,以上就是“Helm部署服務(wù)的方法是什么”的內(nèi)容了,經(jīng)過本文的學(xué)習(xí)后,相信大家對(duì)Helm部署服務(wù)的方法是什么這一問題有了更深刻的體會(huì),具體使用情況還需要大家實(shí)踐驗(yàn)證。這里是億速云,小編將為大家推送更多相關(guān)知識(shí)點(diǎn)的文章,歡迎關(guān)注!
免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場,如果涉及侵權(quán)請(qǐng)聯(lián)系站長郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。