k8s 1.30 通过helm部署ingress-controller-4.12.1

一、基本概念

        k8s集群中,ingress作为集群内服务对外暴漏的访问接入点,几乎承载着集群内服务访问的所有流量。ingress是k8s中的一个资源对象,用来管理集群外部访问集群内部服务的方式。可以通过ingress资源来配置不同的转发规则,从而达到根据不同的规则设置访问集群内不同的Service后端Pod。

        Ingress资源仅支持http流量的规则,无法配置一些高级特性。如:负载均衡的算法,Sessions Affinity等,这些高级特性都需要再ingress Controller中进行配置。

二、原理

        为了是得ingress资源正常工作,集群中必须要有个ingress controller来解析ingress的转发规则。ingress controller收到请求,匹配ingress转发规则到后端service,而service转发到pod,最终由pod处理请求。k8s中service、ingress、ingress controller有着以下关系:

  • service是后端真是服务的抽象,一个serivce可以代表多个相同的后端服务。
  • ingress是反向代理规则,用来规定http/https请求因该被转发到那个service上。如根据请求中不同的host和url路径,让请求落到不同的service上。
  • ingress controller是一个反向代理程序,负责解析ingress的反向代理规则。如果ingress有增删改的变动,ingress Controller会及时更新自己相应的转发规则,当ingress Controller收到请求后就会根据这些规则将请求转发到对应的service。

ingressController通过api server获取ingress资源的变化,动态生成load Balancer(如nginx)所需要的配置文件(如nginx.conf),然后重新加载load Balancer(r如:nginx -s reload重新加载nginx)来生成新的路由转发规则。

三、修改文件

# egrep -v "^$|^#|^ *#" values.yaml
global:image:registry: k8s.kubesre.xyz
namespaceOverride: ""
commonLabels: {}
controller:name: controllerenableAnnotationValidations: trueimage:chroot: falseregistry: registry-cn-hangzhou.ack.aliyuncs.comimage: acs/aliyun-ingress-controllertag: "v1.11.5-aliyun.1"pullPolicy: IfNotPresentrunAsNonRoot: truerunAsUser: 101runAsGroup: 82allowPrivilegeEscalation: falseseccompProfile:type: RuntimeDefaultreadOnlyRootFilesystem: falsecontainerName: controllercontainerPort:http: 80https: 443config: {}configAnnotations: {}proxySetHeaders: {}addHeaders: {}dnsConfig: {}hostAliases: []hostname: {}dnsPolicy: ClusterFirstreportNodeInternalIp: falsewatchIngressWithoutClass: falseingressClassByName: falseenableTopologyAwareRouting: falsedisableLeaderElection: falseelectionTTL: ""allowSnippetAnnotations: falsehostNetwork: truehostPort:enabled: falseports:http: 80https: 443networkPolicy:enabled: falseelectionID: ""ingressClassResource:name: nginxenabled: truedefault: falseannotations: {}controllerValue: k8s.io/ingress-nginxaliases: []parameters: {}ingressClass: nginxpodLabels: {}podSecurityContext: {}sysctls: {}containerSecurityContext: {}publishService:enabled: truepathOverride: ""scope:enabled: falsenamespace: ""namespaceSelector: ""configMapNamespace: ""tcp:configMapNamespace: ""annotations: {}udp:configMapNamespace: ""annotations: {}maxmindLicenseKey: ""extraArgs: {}extraEnvs: []kind: DaemonSetannotations: {}labels: {}updateStrategy: {}progressDeadlineSeconds: 0minReadySeconds: 0tolerations:- key: ""operator: "Exists"value: ""affinity: {}topologySpreadConstraints: []terminationGracePeriodSeconds: 300nodeSelector:kubernetes.io/os: linuxboge/ingress-controller-ready: "true"livenessProbe:httpGet:path: "/healthz"port: 10254scheme: HTTPinitialDelaySeconds: 10periodSeconds: 10timeoutSeconds: 1successThreshold: 1failureThreshold: 5readinessProbe:httpGet:path: "/healthz"port: 10254scheme: HTTPinitialDelaySeconds: 10periodSeconds: 10timeoutSeconds: 1successThreshold: 1failureThreshold: 3healthCheckPath: "/healthz"healthCheckHost: ""podAnnotations: {}replicaCount: 1minAvailable: 1unhealthyPodEvictionPolicy: ""resources:limits:cpu: 6memory: 12Girequests:cpu: 2memory: 4Giautoscaling:enabled: falseannotations: {}minReplicas: 1maxReplicas: 11targetCPUUtilizationPercentage: 50targetMemoryUtilizationPercentage: 50behavior: {}autoscalingTemplate: []keda:apiVersion: "keda.sh/v1alpha1"enabled: falseminReplicas: 1maxReplicas: 11pollingInterval: 30cooldownPeriod: 300restoreToOriginalReplicaCount: falsescaledObject:annotations: {}triggers: []behavior: {}enableMimalloc: truecustomTemplate:configMapName: ""configMapKey: ""service:enabled: trueexternal:enabled: trueannotations: {}labels: {}type: ClusterIPclusterIP: ""externalIPs: []loadBalancerIP: ""loadBalancerSourceRanges: []loadBalancerClass: ""externalTrafficPolicy: ""sessionAffinity: ""ipFamilyPolicy: SingleStackipFamilies:- IPv4enableHttp: trueenableHttps: trueports:http: 80https: 443targetPorts:http: httphttps: httpsappProtocol: truenodePorts:http: ""https: ""tcp: {}udp: {}internal:enabled: falseannotations: {}type: ""clusterIP: ""externalIPs: []loadBalancerIP: ""loadBalancerSourceRanges: []loadBalancerClass: ""externalTrafficPolicy: ""sessionAffinity: ""ipFamilyPolicy: SingleStackipFamilies:- IPv4ports: {}targetPorts: {}appProtocol: truenodePorts:http: ""https: ""tcp: {}udp: {}shareProcessNamespace: falseextraContainers: []extraVolumeMounts: []extraVolumes: []extraInitContainers: []extraModules: []admissionWebhooks:name: admissionannotations: {}enabled: trueextraEnvs: []failurePolicy: Failport: 8443certificate: "/usr/local/certificates/cert"key: "/usr/local/certificates/key"namespaceSelector: {}objectSelector: {}labels: {}service:annotations: {}externalIPs: []loadBalancerSourceRanges: []servicePort: 443type: ClusterIPcreateSecretJob:name: createsecurityContext:runAsNonRoot: truerunAsUser: 65532runAsGroup: 65532allowPrivilegeEscalation: falseseccompProfile:type: RuntimeDefaultcapabilities:drop:- ALLreadOnlyRootFilesystem: trueresources: {}patchWebhookJob:name: patchsecurityContext:runAsNonRoot: truerunAsUser: 65532runAsGroup: 65532allowPrivilegeEscalation: falseseccompProfile:type: RuntimeDefaultcapabilities:drop:- ALLreadOnlyRootFilesystem: trueresources: {}patch:enabled: trueimage:registry: registry.k8s.ioimage: ingress-nginx/kube-webhook-certgentag: v1.5.2pullPolicy: IfNotPresentpriorityClassName: ""podAnnotations: {}networkPolicy:enabled: falsenodeSelector:kubernetes.io/os: linuxboge/ingress-controller-ready: "true"tolerations:- operator: Existslabels: {}securityContext: {}rbac:create: trueserviceAccount:create: truename: ""automountServiceAccountToken: truecertManager:enabled: falserootCert:duration: ""admissionCert:duration: ""metrics:port: 10254portName: metricsenabled: falseservice:enabled: trueannotations: {}labels: {}externalIPs: []loadBalancerSourceRanges: []servicePort: 10254type: ClusterIPserviceMonitor:enabled: falseadditionalLabels: {}annotations: {}namespace: ""namespaceSelector: {}scrapeInterval: 30stargetLabels: []relabelings: []metricRelabelings: []prometheusRule:enabled: falseadditionalLabels: {}annotations: {}rules: []lifecycle:preStop:exec:command:- /wait-shutdownpriorityClassName: ""
revisionHistoryLimit: 10
defaultBackend:enabled: falsename: defaultbackendimage:registry: registry.k8s.ioimage: defaultbackend-amd64tag: "1.5"pullPolicy: IfNotPresentrunAsNonRoot: truerunAsUser: 65534runAsGroup: 65534allowPrivilegeEscalation: falseseccompProfile:type: RuntimeDefaultreadOnlyRootFilesystem: trueextraArgs: {}serviceAccount:create: truename: ""automountServiceAccountToken: trueextraEnvs: []port: 8080livenessProbe:failureThreshold: 3initialDelaySeconds: 30periodSeconds: 10successThreshold: 1timeoutSeconds: 5readinessProbe:failureThreshold: 6initialDelaySeconds: 0periodSeconds: 5successThreshold: 1timeoutSeconds: 5updateStrategy: {}minReadySeconds: 0tolerations: - key: ""operator: "Exists"value: ""affinity: {}topologySpreadConstraints: []podSecurityContext: {}containerSecurityContext: {}podLabels: {}nodeSelector:kubernetes.io/os: linuxboge/ingress-controller-ready: "true"podAnnotations: {}replicaCount: 1minAvailable: 1unhealthyPodEvictionPolicy: ""resources: {}extraVolumeMounts: []extraVolumes: []extraConfigMaps: []autoscaling:annotations: {}enabled: falseminReplicas: 1maxReplicas: 2targetCPUUtilizationPercentage: 50targetMemoryUtilizationPercentage: 50networkPolicy:enabled: falseservice:annotations: {}externalIPs: []loadBalancerSourceRanges: []servicePort: 80type: ClusterIPpriorityClassName: ""labels: {}
rbac:create: truescope: false
serviceAccount:create: truename: ""automountServiceAccountToken: trueannotations: {}
imagePullSecrets: []
tcp: {}
udp: {}
portNamePrefix: ""
dhParam: ""

# helm upgrade --install ingress-nginx -n ingress-nginx . -f values.yaml

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。
如若转载,请注明出处:http://www.pswp.cn/diannao/93499.shtml
繁体地址,请注明出处:http://hk.pswp.cn/diannao/93499.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

Gitee:本土开发者生态的崛起与数字化转型新引擎

Gitee:本土开发者生态的崛起与数字化转型新引擎 在数字化转型浪潮席卷全球的当下,代码托管平台已从单纯的代码存储工具演变为企业技术创新的基础设施。作为中国领先的一站式DevOps平台,Gitee以其本地化优势和创新功能矩阵,正重新定…

Servlet HTTP 状态码详解

Servlet HTTP 状态码详解 引言 在Web开发中,HTTP状态码是服务器响应客户端请求时返回的状态信息。这些状态码有助于开发者了解请求处理的结果,并针对不同的状态码进行相应的处理。Servlet作为Java Web开发的重要技术之一,理解HTTP状态码对于开发高质量的Web应用至关重要。…

ubuntu qt环境下出现No suitable kits found解决方案

1. 清理 Qt Creator 缓存Qt Creator 会缓存项目配置、索引等数据,可能导致某些异常。清理方法:(1) 删除 Qt Creator 配置目录bashrm -rf ~/.config/QtProject/(Ubuntu/Linux) 或 Windows:cmdrmdir /s /q "%APPDAT…

【保姆级喂饭教程】Python依赖管理工具大全:Virtualenv、venv、Pipenv、Poetry、pdm、Rye、UV、Conda、Pixi等

目录前言1前言2一、包管理工具1. pip(Python官方,2008)二、虚拟环境工具1. virtualenv(Ian Bicking,2007)2. venv(Python3.3,2012)三、版本管理工具1. pyenv(…

Linux进程概念(五)进程地址空间

地址空间排布这段空间中自上而下,地址是增长的,栈是向地址减小方向增长,里面存放函数中的临时变量,而堆是向地址增长方向增长,malloc开辟的地址空间存放在堆区,堆栈之间的共享区域,主要用来加载…

Go语言实战案例-判断二叉树是否对称

给定一棵二叉树,判断这棵树是否是对称的。对称的含义是:这棵树的左子树和右子树在结构上是镜像对称的,且对应节点的值相等。示例 1:1/ \2 2/ \ / \ 3 4 4 3输出:true示例 2:1/ \2 2\ \3 3输出&a…

【机器学习深度学习】为什么需要分布式训练?

目录 前言 一、模型规模爆炸:单卡GPU已难以承载 1.1 问题描述 1.2 面临挑战 1.3 解决方案:模型并行 (Model Parallelism) 1.4 类比理解:模型并行 1.5 模型并行的关键点 1.6 模型并行(Model Parallelism)的流程…

二十八、【Linux系统域名解析】DNS安装、子域授权、缓存DNS、分离解析、多域名解析

DNS服务深度解析:缓存、分离与多域名管理一、DNS服务架构全景DNS核心组件关系DNS服务器类型对比二、基础DNS服务配置1. Bind9核心配置文件2. 区域文件结构解析区域文件记录类型表三、子域授权与分层解析子域授权原理子域配置流程1. 父域配置2. 子域配置递归与迭代查…

【LeetCode】前缀表相关算法

目录1、介绍2、核心概念【1】前缀和后缀【2】最长公共前后缀(LPS)3、相关算法题【1】找出字符串中第一个匹配项的下标【2】重复的子字符串1、介绍 前缀表是一种在字符串匹配算法(特别是KMP算法)中使用的数据结构,用于…

(六) Spring AI 1.0版本 + 千问大模型+RAG

上篇文章我们大概讲了一下向量模型的知识&#xff0c;本篇文章&#xff0c;我们将会通过RAG实战的形式&#xff0c;来感受一下RAG。 项目准备 pom.xml 这里我们需要引入向量库和pdf相关的包<dependency><groupId>org.springframework.ai</groupId><artifa…

Spring Boot与Mybatis-Plus集成SQLServer的完整指南

本文还有配套的精品资源&#xff0c;点击获取 简介&#xff1a;本项目旨在演示如何将SQLServer与Spring Boot以及Mybatis-Plus框架进行整合&#xff0c;打造一个高效稳定的后端服务。详细介绍涉及了数据库连接、实体类定义、Mapper接口创建、Service层业务逻辑编写、Control…

【工作笔记】判断一条方法需不需要事务/AOP

① 看注解方法/类上有 Transactional → 需要事务&#xff0c;必须走代理方法/类上有自定义 AOP 注解&#xff08;如 Log、Retry、Cacheable 等&#xff09;→ 需要代理什么都没有 → 几乎肯定不需要示例需求Transactional public void generateDailyTask(...)✅ 需要事务publi…

Unity 的UI动画调节

在游戏开发中&#xff0c;精美的UI动画能极大提升用户体验。Unity提供了强大的动画系统&#xff0c;让开发者可以轻松创建流畅的界面动效。本文将介绍UI动画的核心概念、制作流程和实用技巧。一、核心动画组件Animation窗口 - 可视化创建关键帧动画Animator组件 - 控制动画状态…

26考研11408数据结构

数据结构 1.绪论1.1.1数据结构的基本概念 数据数据元素&#xff1a;数据的基本单位&#xff0c;一个数据元素由多个数据项组成&#xff0c;数据项是组成数据元素不可分割的最小单位数据对象&#xff1a;具有相同性质的数据元素的集合&#xff0c;是数据的一个子集数据类型&…

Solar月赛(应急响应)——攻击者使用什么漏洞获取了服务器的配置文件?

某某文化有限公司的运维小王刚刚搭建服务器发现cpu莫名的异常的升高请你帮助小王排查一下服务器。 文章目录事件介绍事件1&#xff1a;帮助小王找到是什么漏洞?事件2&#xff1a;系统每天晚上系统都会卡卡的帮小明找到问题出在了那&#xff1f;事件3&#xff1a;恶意域名是什么…

高频面试题

1.HashMap的底层原理JDK1.7版本之前&#xff0c;HashMap的底层数据结构是数组链表&#xff0c;HashMap通过哈希算法会将元素的key映射待数组的的槽位(Bucket)。如果多个键映射到同一个槽位&#xff0c;就会以链表的形式存储在同一个槽位上。但是链表的查询的复杂度O(n),所有冲突…

鱼皮项目简易版 RPC 框架开发(四)

本文为笔者阅读鱼皮的项目 《简易版 RPC 框架开发》的笔记&#xff0c;如果有时间可以直接去看原文&#xff0c; 1. 简易版 RPC 框架开发 前面的内容可以笔者的前面几篇笔记 鱼皮项目简易版 RPC 框架开发&#xff08;一&#xff09; 鱼皮项目简易版 RPC 框架开发&#xff08;二…

力扣-79.单词搜索

题目链接 79.单词搜索 class Solution {int m, n;public boolean exist(char[][] board, String word) {m board.length;n board[0].length;boolean[][] visited new boolean[m][n];// 遍历网格中的每个单元格作为搜索起点for (int i 0; i < m; i) {for (int j 0; j …

LabVIEW的To More Specific Class功能说明

​To More Specific Class 是 LabVIEW 中用于控件引用类型转换的关键函数。可将通用 GObject 引用&#xff0c;精准转为 Listbox、TreeControl 等特定控件类引用&#xff0c;让开发者能调用专属属性&#xff08;如获取列表行数&#xff09;&#xff0c;实现对不同控件类的差异化…

Ubuntu20.04安装和配置Samba实现Win11下共享文件夹

Samba是在Linux和UNIX系统上实现 SMB / CIFS 协议的开源软件&#xff0c;主要用于局域网内的文件共享和打印服务。Samba通过SMB/CIFS协议实现跨平台资源共享&#xff0c;支持匿名用户和本地用户访问共享目录&#xff0c;客户端主要为Windows系统。其核心进程包括&#xff1a; ‌…