Helm 的简单使用 wordpress install

概述

尝试使用Helm部署wordpress博客服务

Helm | Helm

Helm命令

bash自动补全

Helm | Helm补全 - bash

wordpress案例

install

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

helm install wordpress bitnami/wordpress \
--namespace=wordpress \
--create-namespace \
--set global.storageClass=nfs-client \
--set wordpressUsername=admin \
--set wordpressPassword=password \
--set replicaCount=2 \
--set service.type=NodePort \
--set service.nodePorts.http=30808 \
--set persistence.enabled=true \
--set persistence.size=10Gi \
--set volumePermissions.enabled=true \
--set mariadb.enabled=true \
--set mariadb.architecture=standalone \
--set mariadb.auth.rootPassword=password \
--set mariadb.auth.password=password \
--set mariadb.primary.persistence.enabled=true \
--set mariadb.primary.persistence.size=8Gi \
--set memcached.enabled=true \
--set wordpressConfigureCache=true



NAME: wordpress
LAST DEPLOYED: Sat Sep 23 22:01:43 2023
NAMESPACE: wordpress
STATUS: deployed
REVISION: 1
TEST SUITE: None
NOTES:
CHART NAME: wordpress
CHART VERSION: 17.1.10
APP VERSION: 6.3.1

** 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.wordpress.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:

   export NODE_PORT=$(kubectl get --namespace wordpress -o jsonpath="{.spec.ports[0].nodePort}" services wordpress)
   export NODE_IP=$(kubectl get nodes --namespace wordpress -o jsonpath="{.items[0].status.addresses[0].address}")
   echo "WordPress URL: http://$NODE_IP:$NODE_PORT/"
   echo "WordPress Admin URL: http://$NODE_IP:$NODE_PORT/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: admin
  echo Password: $(kubectl get secret --namespace wordpress wordpress -o jsonpath="{.data.wordpress-password}" | base64 -d)

 登录后端mariadb数据库

部署成功后端:

网页验证(非网页管理员访问):User's Blog!icon-default.png?t=N7T8http://192.168.164.14:30808/

登录页面:

NODE_PORT=$(kubectl get --namespace wordpress -o jsonpath="{.spec.ports[0].nodePort}" services wordpress)
NODE_IP=$(kubectl get nodes --namespace wordpress -o jsonpath="{.items[0].status.addresses[0].address}")


echo "WordPress URL: http://$NODE_IP:$NODE_PORT/"
#WordPress URL: http://192.168.164.14:30808/


echo "WordPress Admin URL: http://$NODE_IP:$NODE_PORT/admin"
#WordPress Admin URL: http://192.168.164.14:30808/admin

网站管理员访问: http://192.168.164.14:30808/admin

修改中文:

uninstall

 helm uninstall wordpress -n wordpress

查看名称空间并强制删除对应资源才能算删除干净

kubectl delete ns wordpress --force

查看nfs服务器内的文件内容

参考文档

Helm | 使用Helm

kubernetes部署nfs-subdir-external-provisioner_willops的博客-CSDN博客

文章来源地址https://uudwc.com/A/zkrjg

原文地址:https://blog.csdn.net/m0_59267075/article/details/133219603

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处: 如若内容造成侵权/违法违规/事实不符,请联系站长进行投诉反馈,一经查实,立即删除!

h
上一篇 2023年09月24日 13:01
下一篇 2023年09月24日 13:01