当前位置: 首页 > news >正文

珠海正规网站制作系统无线新闻台直播app下载

珠海正规网站制作系统,无线新闻台直播app下载,重庆建筑特种作业查询网,西安网站建设首选那家前言 类似于 Linux 的 YUM、APT,Helm 是 K8S 的包管理工具。 Helm, 一个二进制工具,用来安装、升级、卸载 K8S 中的应用程序。 Helm Chart,一个 tgz 包,类似安卓的 APK。 K8S 应用打包成 Chart,通过 He…

前言

类似于 Linux 的 YUM、APT,Helm 是 K8S 的包管理工具。

Helm, 一个二进制工具,用来安装、升级、卸载 K8S 中的应用程序。

Helm Chart,一个 tgz 包,类似安卓的 APK。

K8S 应用打包成 Chart,通过 Helm 安装到 K8S 集群中。

一、安装Helm

用二进制版本安装

每个Helm 版本都提供了各种操作系统的二进制版本,这些版本可以手动下载和安装。

下载 需要的版本

wget https://repo.huaweicloud.com/helm/v3.5.4/helm-v3.5.4-linux-amd64.tar.gz

解压

tar -zxvf helm-v3.5.4-linux-amd64.tar.gz

在解压目录中找到helm程序,移动到需要的目录中

mv linux-amd64/helm /usr/local/bin/helm

然后就可以执行客户端程序并 添加稳定仓库: helm help

二、配置helm

微软仓库(http://mirror.azure.cn/kubernetes/charts/)

阿里云仓库(https://kubernetes.oss-cn-hangzhou.aliyuncs.com/charts )

推荐仓库(https://charts.bitnami.com/bitnami  )

添加仓库  :helm repo add 自定义仓库名 仓库地址  (仓库地址就是上面几个网站地址)

[root@k8s-master-136 samve]# helm repo add apphub https://charts.bitnami.com/bitnami

删除仓库 : helm repo remove 仓库名    

更新仓库 : helm repo update   

查看仓库 : helm repo list

搜索仓库的chart: helm  search repo chart名称

三、使用helm快速部署一个应用

使用搜索命令搜索应用

helm search repo 应用名称

[root@k8s-master-136 samve]# helm search repo nginx
NAME                            CHART VERSION   APP VERSION     DESCRIPTION                                       
apphub/nginx                    15.3.3          1.25.2          NGINX Open Source is a web server that can be a...
apphub/nginx-ingress-controller 9.9.0           1.9.0           NGINX Ingress Controller is an Ingress controll...
apphub/nginx-intel              2.1.15          0.4.9           DEPRECATED NGINX Open Source for Intel is a lig...

根据搜索内容选择安装

helm install 安装后应用的名称 搜索之后应用的名称

[root@k8s-master-136 samve]# helm install my-nginx apphub/nginx
NAME: my-nginx
LAST DEPLOYED: Thu Oct 12 22:16:31 2023
NAMESPACE: default
STATUS: deployed
REVISION: 1
TEST SUITE: None
NOTES:
CHART NAME: nginx
CHART VERSION: 15.3.3
APP VERSION: 1.25.2** Please be patient while the chart is being deployed **
NGINX can be accessed through the following DNS name from within your cluster:my-nginx.default.svc.cluster.local (port 80)To access NGINX from outside the cluster, follow the steps below:1. Get the NGINX 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 my-nginx'export SERVICE_PORT=$(kubectl get --namespace default -o jsonpath="{.spec.ports[0].port}" services my-nginx)export SERVICE_IP=$(kubectl get svc --namespace default my-nginx -o jsonpath='{.status.loadBalancer.ingress[0].ip}')echo "http://${SERVICE_IP}:${SERVICE_PORT}"

查看安装之后的状态

helm list

[root@k8s-master-136 samve]# helm list
NAME            NAMESPACE       REVISION        UPDATED                                 STATUS          CHART                   APP VERSION
my-nginx        default         1               2023-10-12 22:16:31.191334159 +0800 CST deployed        nginx-15.3.3            1.25.2     
nginx           default         1               2023-10-12 21:52:49.36634682 +0800 CST  deployed        nginx-intel-2.1.15      0.4.9   

helm status 安装之后应用的名称

[root@k8s-master-136 samve]# helm status my-nginx
NAME: my-nginx
LAST DEPLOYED: Thu Oct 12 22:16:31 2023
NAMESPACE: default
STATUS: deployed
REVISION: 1
TEST SUITE: None
NOTES:
CHART NAME: nginx
CHART VERSION: 15.3.3
APP VERSION: 1.25.2** Please be patient while the chart is being deployed **
NGINX can be accessed through the following DNS name from within your cluster:my-nginx.default.svc.cluster.local (port 80)To access NGINX from outside the cluster, follow the steps below:1. Get the NGINX 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 my-nginx'export SERVICE_PORT=$(kubectl get --namespace default -o jsonpath="{.spec.ports[0].port}" services my-nginx)export SERVICE_IP=$(kubectl get svc --namespace default my-nginx -o jsonpath='{.status.loadBalancer.ingress[0].ip}')echo "http://${SERVICE_IP}:${SERVICE_PORT}"

当然我们也可以通过kubectl命令查看相关的pod是否创建成功

[root@k8s-master-136 samve]# kubectl get svc,pod
NAME                        TYPE           CLUSTER-IP      EXTERNAL-IP   PORT(S)                      AGE
service/kubernetes          ClusterIP      10.10.0.1       <none>        443/TCP                      258d
service/my-nginx            LoadBalancer   10.10.200.7     <pending>     80:32374/TCP                 9m37s
service/nginx               NodePort       10.10.183.194   <none>        80:30111/TCP                 258d
service/nginx-nginx-intel   LoadBalancer   10.10.72.168    <pending>     80:32756/TCP,443:30799/TCP   33mNAME                                     READY   STATUS             RESTARTS   AGE
pod/my-nginx-8568bb4694-gn5b7            1/1     Running            0          9m37s
pod/nginx-2-69947fd9df-plct2             1/1     Running            2          47h
pod/nginx-6799fc88d8-2jh5z               1/1     Running            2          47h
pod/nginx-nginx-intel-668b58fb4b-8cm6z   0/1     ImagePullBackOff   0          33m
pod/nginx1-b7fb675cb-rhtvn               0/1     CrashLoopBackOff   50         47h
pod/nginx2-74ff6c9fbc-2gb7r              0/1     CrashLoopBackOff   50         47h

四、自定义chart

自定义选项是因为并不是所有的 chart 都能按照默认配置运行成功,可能会需要一些环境 依赖,例如 PV。 所以我们需要自定义 chart 配置选项,安装过程中有两种方法可以传递配置数据:

  • --values(或-f):指定带有覆盖的 YAML 文件。这可以多次指定,最右边的文件 优先
  • --set:在命令行上指定替代。如果两者都用,--set 优先级高

第一步:使用命令创建chart

helm create chart名称

[root@k8s-master-136 samve]# helm create mychart
Creating mychart
[root@k8s-master-136 samve]# ls mychart/
charts  Chart.yaml  templates  values.yaml
[root@k8s-master-136 samve]# cd mychart/
[root@k8s-master-136 mychart]# ls -al
总用量 16
drwxr-xr-x   4 root  root    93 10月 12 22:33 .
drwx------. 17 samve samve 4096 10月 12 22:33 ..
drwxr-xr-x   2 root  root     6 10月 12 22:33 charts
-rw-r--r--   1 root  root  1143 10月 12 22:33 Chart.yaml
-rw-r--r--   1 root  root   349 10月 12 22:33 .helmignore
drwxr-xr-x   3 root  root   162 10月 12 22:33 templates
-rw-r--r--   1 root  root  1899 10月 12 22:33 values.yaml
  • charts:普通文件夹,刚开始创建为空;
  • Chart.yaml:用于配置当前chart的属性信息,可以作为全局变量提供给模板文件使用;
  • templates:目标信息文件,里面有很多的yaml模板文件,我们使用helm创建应用相当于helm帮我去执行这些yaml文件了;
  • values.yaml:全局变量文件,提供给templates里面的yaml文件用。

因为我们需要自己自定义chart,因此我们可以修改这些yaml文件,也可以删除这些默认生成的yaml文件,然后自己重新写。 

http://www.mnyf.cn/news/38000.html

相关文章:

  • 怎样建立自己的网站赚钱微信推广平台怎么做
  • 看动漫是怎么做视频网站网络营销人员招聘
  • 房产中介网站源码360优化大师官方下载最新版
  • 网站的可用性全网营销图片
  • 网站建设有多少公司seo技术博客
  • seo站长综合查询首页关键词排名代发
  • 富阳网站seo价格seo平台有哪些
  • 国际网站建设工具电商培训机构哪家强
  • 网站毕设网推技巧
  • 浙江建设厅网站那三类人员学会计哪个培训机构比较正规
  • 镇江建设工程质量监督局网站网站怎么做推广
  • 贵州省赤水市代码百度seo指南
  • 高陵县建设局网站sem优化托管
  • 领地免费网站开发怎么自己弄一个网站
  • 申请免费的网站优化公司哪家好
  • php做网站百度推广怎么操作
  • 网站运营这么做网络营销的应用
  • 2016手机网站制作规范网络运营培训班
  • wordpress 添加幻灯片seo的中文含义
  • 企业微信网站怎么做手机百度下载
  • 网站建设简介是什么意思百度推广后台登录页面
  • 建设网站域名备案查询网络营销策略内容
  • 响应式网站设计的优点网站收录优化
  • 自己做电视视频网站百度指数怎么分析
  • 网站开发图片压缩沈阳百度快照优化公司
  • 网站目录做二级域名跨境电商靠谱吗
  • 小程序可以做企业网站seo赚钱
  • 台州网页设计招聘搜索引擎营销优化诊断训练
  • 网站建设中的图片网络营销渠道可分为
  • 哪里做网站排名优化网站找哪家