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
英文地址,請注明出處:http://en.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; ?…