Kubernetes
1.Kubernetes安装配置
Ubuntu安装containerd
更换Ubuntu安装源
2.Kubernetes集群管理
服务质量QoS
强制重启pod
Label
测试环境管理
service+deployment+ingress+hpa
networking.k8s.io/v1
k3s
k3s脚本快速安装
k3s卸载
k3s-containerd仓库配置
rookceph
1. 安装配置
2. 管理排障
k8s中查看rookceph控制台admin密码
k3s-启用traefik仪表盘
helm
Chartmuseum
artifact hub
Helm内置对象Release相关变量
96.Ingress
ingress-nginx-annotations
97.CKA认证
98.Kubernetes开发
本文档使用 MrDoc 发布
-
+
首页
Chartmuseum
# Chartmuseum helm3默认不再提供仓库功能,需要通过官方提供的工具chartmuseum来实现。 ## 使用k8s部署 - k8s版本: v1.22.5+k3s1 - yaml配置文件 ```yaml apiVersion: v1 kind: Service metadata: labels: production: chartmuseum name: chartmuseum namespace: default spec: ports: - port: 80 targetPort: 8080 name: chartmuseum selector: app: chartmuseum --- apiVersion: apps/v1 kind: Deployment metadata: name: chartmuseum-deployment namespace: default spec: replicas: 1 minReadySeconds: 15 strategy: type: RollingUpdate rollingUpdate: maxSurge: 1 maxUnavailable: 1 selector: matchLabels: app: chartmuseum template: metadata: labels: app: chartmuseum spec: # imagePullSecrets: # - name: registry-secret dnsPolicy: Default containers: - name: chartmuseum image: bitnami/chartmuseum:latest imagePullPolicy: IfNotPresent env: - name: TZ value: Asia/Shanghai ports: - containerPort: 8080 resources: {} --- apiVersion: traefik.containo.us/v1alpha1 kind: IngressRoute metadata: labels: name: chartmuseum namespace: default spec: entryPoints: - web routes: - match: Host(`chartmuseum.local`) && PathPrefix(`/{path:[a-zA-Z*]*}`) kind: Rule services: - name: chartmuseum kind: Service port: 80 ``` ## 使用chartmuseum - 添加chartmuseum到helm ``` helm repo add localrepo http://chartmuseum.local [root@localhost ~]# helm repo list NAME URL grafana https://grafana.github.io/helm-charts bitnami https://charts.bitnami.com/bitnami localrepo http://chartmuseum.local ``` - 安装helm push插件,推送chart ``` helm plugin install https://github.com/chartmuseum/helm-push.git # 启用实验性功能 export HELM_EXPERIMENTAL_OCI=1 # 先在外部仓库pull一个镜像下来 helm pull bitnami/wordpress # 推送到本地仓库 [root@centos-001 ~]# helm cm-push wordpress-12.2.8.tgz localrepo Pushing wordpress-12.2.8.tgz to localrepo... Done. [root@centos-001 ~]# helm repo update localrepo [root@centos-001 ~]# helm search repo localrepo NAME CHART VERSION APP VERSION DESCRIPTION localrepo/wordpress 12.2.8 5.8.2 Web publishing platform for building blogs and .. ``` - 使用本地仓库安装 ``` [root@centos-001 ~]# hhelm install wordpredd localrepo/wordpress NAME: wordpredd LAST DEPLOYED: Thu Jan 6 14:14:26 2022 NAMESPACE: default STATUS: deployed REVISION: 1 TEST SUITE: None NOTES: CHART NAME: wordpress CHART VERSION: 12.2.8 APP VERSION: 5.8.2 ** Please be patient while the chart is being deployed ** Your WordPress site can be accessed through the following DNS name from within your cluster: wordpredd-wordpress.default.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 default -w wordpredd-wordpress' export SERVICE_IP=$(kubectl get svc --namespace default wordpredd-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 default wordpredd-wordpress -o jsonpath="{.data.wordpress-password}" | base64 --decode) # 按提示查看一下wodpress的密码,能够查询到就是创建成功了 [root@centos-001 ~]# echo Password: $(kubectl get secret --namespace default wordpredd-wordpress -o jsonpath="{.data.wordpress-password}" | base64 --decode) Password: bD59myOIRZ ```
zhangky
2022年1月6日 14:28
分享文档
收藏文档
上一篇
下一篇
微信扫一扫
复制链接
手机扫一扫进行分享
复制链接
关于 MrDoc
觅思文档MrDoc
是
州的先生
开发并开源的在线文档系统,其适合作为个人和小型团队的云笔记、文档和知识库管理工具。
如果觅思文档给你或你的团队带来了帮助,欢迎对作者进行一些打赏捐助,这将有力支持作者持续投入精力更新和维护觅思文档,感谢你的捐助!
>>>捐助鸣谢列表
微信
支付宝
QQ
PayPal
Markdown文件
分享
链接
类型
密码
更新密码