博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
K8s helm 创建自定义Chart
阅读量:5207 次
发布时间:2019-06-14

本文共 1664 字,大约阅读时间需要 5 分钟。

# 删除之前创建的 charthelm listhelm delete --purge redis1# 创建自定义 chart myappcd ~/helmhelm create myappcd myapp/# 修改 Chart.yamlcat Chart.yamlapiVersion: v1appVersion: "1.0"description: A Helm chart for Kubernetes myapp chartname: myappversion: 0.0.1maintainer:- name: klvchen  email: klvchen@126.com  url: http://www.klvchen.com# 修改 values.yamlcat values.yaml # Default values for myapp.# This is a YAML-formatted file.# Declare variables to be passed into your templates.replicaCount: 2image:  repository: ikubernetes/myapp  tag: v1  pullPolicy: IfNotPresentservice:  type: ClusterIP  port: 80  targetPort: 80ingress:  enabled: false  annotations:     kubernetes.io/ingress.class: nginx    kubernetes.io/tls-acme: "true"  path: /  hosts:    - chart-example.local  tls: []  #  - secretName: chart-example-tls  #    hosts:  #      - chart-example.localresources:   # We usually recommend not to specify default resources and to leave this as a conscious  # choice for the user. This also increases chances charts run on environments with little  # resources, such as Minikube. If you do want to specify resources, uncomment the following  # lines, adjust them as necessary, and remove the curly braces after 'resources:'.  limits:    cpu: 100m    memory: 128Mi  requests:    cpu: 100m    memory: 128MinodeSelector: {}tolerations: []affinity: {}# 测试打包cd ..helm lint ./myapphelm package myapp/# 创建代理,注意这里需要在 myapp-0.0.1.tgz  同级上执行,这里会启动一个web服务,端口为 8879helm serve# 新开一个终端,安装helm install --name myapp1 local/myapp# 测试,访问 ClusterIPcurl 10.102.91.53#运行结果,正常:Hello MyApp | Version: v1 | Pod Name# 查看 myapp1 的状态helm status myapp1

转载于:https://www.cnblogs.com/klvchen/p/10096666.html

你可能感兴趣的文章
jsp组成元素
查看>>
排序算法(转)
查看>>
windows自带的可生成各种数据库连接字符串工具打开方法
查看>>
form表单中method的get和post区别
查看>>
【做题】arc068_f-Solitaire——糊结论
查看>>
Poj 1094 拓扑排序 水题
查看>>
JavaScript深入系列(一)--原型和原型链详解
查看>>
一点感想
查看>>
Python命名规范
查看>>
滚动条
查看>>
程序员的自我修养九Windows下的动态链接
查看>>
BZOJ 4052: [Cerc2013]Magical GCD
查看>>
Codeforces Round #361 (Div. 2)
查看>>
oauth2学习
查看>>
Python time & datetime & string 相互转换
查看>>
细说WebSocket - Node篇
查看>>
java.lang.UnsupportedOperationException
查看>>
Linux operating system (Ubuntu) 学习-1
查看>>
Python字典实现分析
查看>>
jenkins+testNG
查看>>