PageSourceSearch

https://www.vcluster.com/docs/assets/js/9841d108.c272f2a2.js

js vcluster.com collected 2026-09-24 19:06:36 UTC 42,359 bytes, 119 lines download raw bytes

1"use strict";(self.webpackChunkvcluster_docs=self.webpackChunkvcluster_docs||[]).push([["11533"],{1589(e,s,n){n.d(s,{Ay:()=>o,RM:()=>i});var a=n(74848),r=n(28453),l=n(16151),c=n.n(l);let i=[{value:"Enable syncing",id:"enable-syncing",level:2}];function t(e){let s={admonition:"admonition",code:"code",h2:"h2",mdxAdmonitionTitle:"mdxAdmonitionTitle",p:"p",strong:"strong",...(0,r.R)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(s.h2,{id:"enable-syncing",children:"Enable syncing"}),"\n",(0,a.jsxs)(s.p,{children:["When enabled, vCluster takes control of all ",e.resourceClass," resources in the tenant cluster. It only allows ",e.resourceClass," resources that are synced from the control plane cluster to exist."]}),"\n",(0,a.jsxs)(s.p,{children:["This example configuration enables syncing ",(0,a.jsx)(s.strong,{children:"all"})," ",e.resourceClass," resources from the control plane cluster to the tenant cluster:"]}),"\n",(0,a.jsx)(c(),{language:"yaml",children:`sync:
2  fromHost:
3    ${e.pluralResourceClass}:
4      enabled: true`}),"\n",(0,a.jsxs)(s.p,{children:["If you try to create the ",e.resourceClass," resource directly in the tenant cluster, using for example ",(0,a.jsx)(s.code,{children:"kubectl create"})," or ",(0,a.jsx)(s.code,{children:"kubectl apply"}),", vCluster detects it and deletes it immediately. This prevents conflicts between locally created ",e.resourceClass," resources and those synced from the control plane cluster, ensuring that only ",e.resourceClass," resources from the control plane cluster exist in the tenant cluster."]}),"\n",(0,a.jsxs)(s.admonition,{type:"warning",children:[(0,a.jsxs)(s.mdxAdmonitionTitle,{children:[e.resourceClass," resource limitation"]}),(0,a.jsxs)(s.p,{children:["When enabled, ",e.resourceClass," resource creation can only occur in the control plane cluster. Any ",e.resourceClass," resources created in the tenant cluster will be deleted."]})]})]})}function o(e={}){let{wrapper:s}={...(0,r.R)(),...e.components};return s?(0,a.jsx)(s,{...e,children:(0,a.jsx)(t,{...e})}):t(e)}},13340(e,s,n){n.d(s,{Ay:()=>o,RM:()=>i});var a=n(74848),r=n(28453),l=n(16151),c=n.n(l);let i=[{value:"Use selectors to filter",id:"use-selectors-to-filter",level:2},{value:"Filter with matchLabels",id:"filter-with-matchlabels",level:3},{value:"Filter with matchExpressions",id:"filter-with-matchexpressions",level:3},{value:"Combined filter criteria",id:"combined-filter-criteria",level:3}];function t(e){let s={a:"a",code:"code",h2:"h2",h3:"h3",li:"li",p:"p",strong:"strong",ul:"ul",...(0,r.R)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(s.h2,{id:"use-selectors-to-filter",children:"Use selectors to filter"}),"\n",(0,a.jsxs)(s.p,{children:["Selectors provide precise control over which ",e.resourceClass," resources get synced from the control plane cluster and which ",e.resource," ",e.showExtraResource&&(0,a.jsxs)(a.Fragment,{children:[" and ",e.extraResource," "]}),"resources gets synced to the control plane cluster. vCluster supports two types of selector criteria that follow standard ",(0,a.jsx)(s.a,{href:"https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#resources-that-support-set-based-requirements",children:"Kubernetes label selector syntax"}),"."]}),"\n",(0,a.jsx)(s.h3,{id:"filter-with-matchlabels",children:"Filter with matchLabels"}),"\n",(0,a.jsxs)(s.p,{children:["The ",(0,a.jsx)(s.code,{children:"matchLabels"})," selector defines ",(0,a.jsx)(s.strong,{children:"exact"})," label key-value pairs that must be present on an ",e.resourceClass," for it to be synced. This provides straightforward filtering based on specific labels."]}),"\n",(0,a.jsxs)(s.p,{children:["The following example syncs only ",e.resourceClass," resources with a ",(0,a.jsx)(s.code,{children:"environment: development"})," label:"]}),"\n",e.showResource&&(0,a.jsx)(a.Fragment,{children:(0,a.jsx)(c(),{language:"yaml",title:"Example with matchLabels",children:`sync:
5  toHost:
6    ${e.pluralResource}:
7      enabled: true
8  fromHost:
9    ${e.pluralResourceClass}:
10      enabled: true
11      selector:
12        matchLabels:
13          environment: development`})}),"\n",!e.showExtraResource&&!e.showResource&&(0,a.jsx)(a.Fragment,{children:(0,a.jsx)(c(),{language:"yaml",title:"Example with matchLabels",children:`sync:
14  fromHost:
15    ${e.pluralResourceClass}:
16      enabled: true
17      selector:
18        matchLabels:
19          environment: development`})}
19),"\n",e.showExtraResource&&(0,a.jsx)(a.Fragment,{children:(0,a.jsx)(c(),{language:"yaml",title:"Example with matchLabels",children:`sync:
20  toHost:
21    ${e.pluralResource}:
22      enabled: true
23    ${e.pluralExtraResource}:
24      enabled: true
25  fromHost:
26    ${e.pluralResourceClass}:
27      enabled: true
28      selector:
29        matchLabels:
30          environment: development`})}),"\n",(0,a.jsx)(s.h3,{id:"filter-with-matchexpressions",children:"Filter with matchExpressions"}),"\n",(0,a.jsxs)(s.p,{children:["The ",(0,a.jsx)(s.code,{children:"matchExpressions"})," selector allows more flexible, set-based filtering with support for multiple operators:"]}),"\n",(0,a.jsxs)(s.ul,{children:["\n",(0,a.jsxs)(s.li,{children:[(0,a.jsx)(s.code,{children:"In"}),": Select all resources that has a specific key and the value is in the set of values"]}),"\n",(0,a.jsxs)(s.li,{children:[(0,a.jsx)(s.code,{children:"NotIn"}),": Select all resources that has a specific key and the value is not in the set of values"]}),"\n",(0,a.jsxs)(s.li,{children:[(0,a.jsx)(s.code,{children:"Exists"}),": Select all resources including a label with the key; no values are checked"]}),"\n",(0,a.jsxs)(s.li,{children:[(0,a.jsx)(s.code,{children:"DoesNotExist"}),": Select all resources without a label with the key; no values are checked"]}),"\n"]}),"\n",(0,a.jsxs)(s.p,{children:["The following example syncs ",e.resourceClass," resources where the key of the label is ",(0,a.jsx)("code",{children:e.expressionKey})," and the value of that label is either ",(0,a.jsx)("code",{children:e.expressionValue1})," or ",(0,a.jsx)("code",{children:e.expressionValue2}),":"]}),"\n",!e.showExtraResource&&!e.showResource&&(0,a.jsx)(a.Fragment,{children:(0,a.jsx)(c(),{language:"yaml",title:"Example with matchExpressions",children:`sync:
31  fromHost:
32    ${e.pluralResourceClass}:
33      enabled: true
34      selector:
35        matchExpressions:
36          - key: ${e.expressionKey}
37            operator: In
38            values:
39              - ${e.expressionValue1}
40              - ${e.expressionValue2}`})}),"\n",e.showResource&&(0,a.jsx)(a.Fragment,{children:(0,a.jsx)(c(),{language:"yaml",title:"Example with matchExpressions",children:`sync:
41  toHost:
42    ${e.pluralResource}:
43      enabled: true
44  fromHost:
45    ${e.pluralResourceClass}:
46      enabled: true
47      selector:
48        matchExpressions:
49          - key: ${e.expressionKey}
50            operator: In
51            values:
52              - ${e.expressionValue1}
53              - ${e.expressionValue2}`})}),"\n",e.showExtraResource&&(0,a.jsx)(a.Fragment,{children:(0,a.jsx)(c(),{language:"yaml",title:"Example with matchExpressions",children:`sync:
54  toHost:
55    ${e.pluralResource}:
56      enabled: true
57    ${e.pluralExtraResource}:
58      enabled: true
59  fromHost:
60    ${e.pluralResourceClass}:
61      enabled: true
62      selector:
63        matchExpressions:
64          - key: ${e.expressionKey}
65            operator: In
66            values:
67              - ${e.expressionValue1}
68              - ${e.expressionValue2}`})}),"\n",(0,a.jsx)(s.h3,{id:"combined-filter-criteria",children:"Combined filter criteria"}),"\n",(0,a.jsxs)(s.p,{children:["Label conditions are additive meaning all specified label conditions must match for the ",e.resourceClass," resource to be selected to be synced. This means that if you define multiple ",(0,a.jsx)(s.code,{children:"matchLabels"})," and ",(0,a.jsx)(s.code,{children:"matchExpressions"}),", the ",e.resourceClass," resource must satisfy all criteria to be synced to the tenant cluster."]}),"\n",(0,a.jsxs)(s.p,{children:["The following example syncs ",e.resourceClass," resources that match both label and expression criteria:"]}),"\n",!e.showExtraResource&&!e.showResource&&(0,a.jsx)(a.Fragment,{children:(0,a.jsx)(c(),{language:"yaml",title:"Example with matchLabels and matchExpressions",children:`sync:
69  fromHost:
70    ${e.pluralResourceClass}:
71      enabled: true
72      selector:
73        matchLabels:
74          environment: development
75        matchExpressions:
76          - key: ${e.expressionKey}
77            operator: In
78            values:
79              - ${e.expressionValue1}
80              - ${e.expressionValue2}`})}
80),"\n",e.showResource&&(0,a.jsx)(a.Fragment,{children:(0,a.jsx)(c(),{language:"yaml",title:"Example with matchLabels and matchExpressions",children:`sync:
81  toHost:
82    ${e.pluralResource}:
83      enabled: true
84  fromHost:
85    ${e.pluralResourceClass}:
86      enabled: true
87      selector:
88        matchLabels:
89          environment: development
90        matchExpressions:
91          - key: ${e.expressionKey}
92            operator: In
93            values:
94              - ${e.expressionValue1}
95              - ${e.expressionValue2}`})}),"\n",e.showExtraResource&&(0,a.jsx)(a.Fragment,{children:(0,a.jsx)(c(),{language:"yaml",title:"Example with matchLabels and matchExpressions",children:`sync:
96  toHost:
97    ${e.pluralResource}:
98      enabled: true
99    ${e.pluralExtraResource}:
100      enabled: true
101  fromHost:
102    ${e.pluralResourceClass}:
103      enabled: true
104      selector:
105        matchLabels:
106          environment: development
107        matchExpressions:
108          - key: ${e.expressionKey}
109            operator: In
110            values:
111              - ${e.expressionValue1}
112              - ${e.expressionValue2}`})}),"\n",(0,a.jsxs)(s.p,{children:["In this example, the ",e.resourceClass," must have the following labels to sync to the tenant cluster:"]}),"\n",(0,a.jsxs)(s.ul,{children:["\n",(0,a.jsx)(s.li,{children:(0,a.jsx)(s.code,{children:"environment: development"})}),"\n",(0,a.jsxs)(s.li,{children:["Either ",(0,a.jsxs)("code",{children:[e.expressionKey,":",e.expressionValue1]})," or ",(0,a.jsxs)("code",{children:[e.expressionKey,":",e.expressionValue2]})]}),"\n"]})]})}function o(e={}){let{wrapper:s}={...(0,r.R)(),...e.components};return s?(0,a.jsx)(s,{...e,children:(0,a.jsx)(t,{...e})}):t(e)}},33141(e,s,n){n.d(s,{Ay:()=>p,RM:()=>h});var a=n(74848),r=n(28453),l=n(16151),c=n.n(l),i=n(1589);function t(e){let s={h2:"h2",li:"li",p:"p",strong:"strong",ul:"ul",...(0,r.R)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(s.h2,{id:"how-syncing-works",children:"How syncing works"}),"\n",(0,a.jsxs)(s.p,{children:["When ",e.resourceClass," syncing is enabled, vCluster can use a label selector to control which\n",e.resourceClass,e.showExtraResource&&(0,a.jsxs)(a.Fragment,{children:[", ",e.extraResource]})," and ",e.resource," resources are synchronized between the control plane and tenant clusters. This affects the resource types with separate unidirectional sync flows:"]}),"\n",(0,a.jsxs)(s.ul,{children:["\n",(0,a.jsxs)(s.li,{children:["\n",(0,a.jsxs)(s.p,{children:[(0,a.jsxs)(s.strong,{children:[e.resourceClass," resources (control plane \u2192 tenant)"]}),": vCluster syncs ",e.resourceClass," resources from the control plane cluster to the tenant cluster. You cannot create ",e.resourceClass," resources directly in the tenant cluster. If a selector is defined, only ",e.resourceClass," resources matching the selector will sync. If no selector is defined, ",(0,a.jsx)(s.strong,{children:"all"})," ",e.resourceClass," resources are synced."]}),"\n"]}),"\n",(0,a.jsxs)(s.li,{children:["\n",(0,a.jsxs)(s.p,{children:[(0,a.jsxs)(s.strong,{children:[e.resource," ",e.showExtraResource&&(0,a.jsxs)(a.Fragment,{children:[" and ",e.extraResource," "]}),"resources (tenant \u2192 control plane)"]}),": vCluster syncs ",e.resource," ",e.showExtraResource&&(0,a.jsxs)(a.Fragment,{children:[" and ",e.extraResource," "]}),"resources from the tenant cluster to the control plane cluster only if any of the following is true:"]}),"\n",(0,a.jsxs)(s.ul,{children:["\n",(0,a.jsxs)(s.li,{children:["No selector is defined for ",e.resourceClass," syncing, which allows all ",e.resource," ",e.showExtraResource&&(0,a.jsxs)(a.Fragment,{children:[" and ",e.extraResource," "]}),"resources to sync regardless of the ",(0,a.jsx)("code",{children:e.resourceClassName}),"."]}),"\n",(0,a.jsxs)(s.li,{children:["The ",e.resource,"'s ",e.showExtraResource&&(0,a.jsxs)(a.Fragment,{children:[" or ",e.extraResource,"'s "]}),(0,a.jsx)("code",{children:e.resourceClassName})," references a ",e.resourceClass," resource that matches the selector and is synced from the control plane cluster."]}),"\n",(0,a.jsxs)(s.li,{children:["The ",e.resource," ",e.showExtraResource&&(0,a.jsxs)(a.Fragment,{children:[" and ",e.extraResource," "]}),"has an empty ",(0,a.jsx)("code",{children:e.resourceClassName})," field."]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,a.jsxs)(s.p,{children:["The same selector controls both sync flows. The selector determines which ",e.resourceClass," resources are imported from the control plane cluster and which ",e.resource," ",e.showExtraResource&&(0,a.jsxs)(a.Fragment,{children:[" and ",e.extraResource," "]}),"resources can sync to the control plane cluster based on the referenced ",e.resourceClass," resource."]})]})}function o(e={}){let{wrapper:s}={...(0,r.R)(),...e.components};return s?(0,a.jsx)(s,{...e,children:(0,a.jsx)(t,{...e})}):t(e)}var d=n(13340);let h=[...i.RM,{value:"How syncing works",id:"how-syncing-works",level:2},...d.RM,{value:"Sync behavior considerations",id:"sync-behavior-considerations",level:2},{value:"Resource lifecycle",id:"resource-lifecycle",level:3},{value:"Orphaned resources",id:"orphaned-resources",level:3},{value:"Error handling and troubleshooting",id:"error-handling-and-troubleshooting",level:3}];function u(e){let s={code:"code",h2:"h2",h3:"h3",li:"li",p:"p",ul:"ul",...(0,r.R)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(i.Ay,{...e}),"\n",(0,a.jsx)(o,{...e}),"\n",(0,a.jsx)(d.Ay,{...e}),"\n",(0,a.jsx)(s.h2,{id:"sync-behavior-considerations",children:"Sync behavior considerations"}),"\n",(0,a.jsx)(s.h3,{id:"resource-lifecycle",children:"Resource lifecycle"}),"\n",(0,a.jsxs)(s.p,{children:["Synced ",e.resourceClass," resources function like any other Kubernetes resource in the tenant cluster. You\ncan view them with ",(0,a.jsxs)("code",{children:["kubectl get ",e.lowercaseResourceClass]})," and reference them in your ",e.resource," ",e.showExtraResource&&(0,a.jsxs)(a.Fragment,{children:[" and ",e.extraResource," "]}),"resource\nspecifications with the ",(0,a.jsx)("code",{children:e.resourceClassName})," field."]}),"\n",(0,a.jsxs)(s.p,{children:["When you modify the ",e.resourceClass," resource in the control plane cluster, vCluster re-evaluates whether it still matches the selector criteria. If the ",e.resourceClass," continues to match, vCluster updates the corresponding resource in the tenant cluster to reflect the changes. If the ",e.resourceClass," no longer matches the selector criteria, vCluster removes it from the tenant cluster."]}),"\n",(0,a.jsxs)(s.p,{children:["The selector system acts as both a resource filter and a validation mechanism. As a resource filter, it\nensures that vCluster creates only ",e.resourceClass," resources matching the defined selector criteria. The selector also functions as a creation validation mechanism - when you create ",e.resource," ",e.showExtraResource&&(0,a.jsxs)(a.Fragment,{children:[" and ",e.extraResource," "]}),"resources in the tenant cluster, the resources can only reference ",e.resourceClass," resources that exist in the tenant cluster."]}),"\n",(0,a.jsx)(s.h3,{id:"orphaned-resources",children:"Orphaned resources"}),"\n",(0,a.jsxs)(s.p,{children:["When vCluster removes a synced ",e.resourceClass," from the tenant cluster due to selector changes or deleti
112on from the control plane cluster,\nany ",e.resource," ",e.showExtraResource&&(0,a.jsxs)(a.Fragment,{children:[" and ",e.extraResource," "]}),"resources that reference it remain in the tenant and control plane clusters. These orphaned ",e.resource," ",e.showExtraResource&&(0,a.jsxs)(a.Fragment,{children:[" and ",e.extraResource," "]}),"resources stop\nreceiving updates but vCluster does not automatically delete them to prevent unintended data loss.\nTo remove these orphaned resources, you must delete them manually in the tenant and control plane clusters. This manual approach ensures that you maintain full control over resource cleanup and can verify that deletions are intentional."]}),"\n",(0,a.jsx)(s.h3,{id:"error-handling-and-troubleshooting",children:"Error handling and troubleshooting"}),"\n",(0,a.jsxs)(s.p,{children:["When the ",e.resourceClass," resource doesn't match the selector criteria during evaluation, vCluster logs a warning in the syncer pod's output to help with troubleshooting and monitoring. This logging provides visibility into which resources are being filtered out and why."]}),"\n",(0,a.jsxs)(s.p,{children:["When you creates the ",e.resource," ",e.showExtraResource&&(0,a.jsxs)(a.Fragment,{children:[" or ",e.extraResource," "]}),"resource that references a ",e.resourceClass," not matching the selector criteria, several things occur to provide clear feedback:"]}),"\n",(0,a.jsxs)(s.ul,{children:["\n",(0,a.jsxs)(s.li,{children:["The ",e.resource," ",e.showExtraResource&&(0,a.jsxs)(a.Fragment,{children:[" or ",e.extraResource," "]}),"fails to sync to the control plane cluster"]}),"\n",(0,a.jsxs)(s.li,{children:["vCluster records an event on the ",e.resource," ",e.showExtraResource&&(0,a.jsxs)(a.Fragment,{children:[" or ",e.extraResource," "]}),"resource in the tenant cluster"]}),"\n",(0,a.jsxs)(s.li,{children:["The event indicates that the specified ",e.resourceClass," is not available according to the current selector configuration"]}),"\n"]}),"\n",(0,a.jsxs)(s.p,{children:["The error output appears as a Kubernetes event that you can view using ",(0,a.jsx)(s.code,{children:"kubectl describe"}),". The event message clearly states that the ",e.resource," ",e.showExtraResource&&(0,a.jsxs)(a.Fragment,{children:[" or ",e.extraResource," "]}),"resource was not synced because the referenced ",e.resourceClass," does not match the defined selector criteria."]}),"\n",(0,a.jsx)(s.p,{children:"The error output looks like this:"}),"\n",(0,a.jsx)(c(),{language:"bash",title:"Example error handling output",children:`vcluster-virtual-cluster-1:~$ kubectl describe ${e.lowercaseResource} my-${e.lowercaseResource}
113Name:                       my-${e.lowercaseResource}
114Namespace:                  default
115${e.resourceClass}:     ${e.expressionValue2}
116Events:
117  Type     Reason            Age   From                   Message
118  ----     ------            ----  ----                    -------
119  Warning  SyncWarning       10s   ${e.lowercaseResource}-syncer      did not sync ${e.lowercaseResource} "my-${e.lowercaseResource}" to host because it does not match the selector under 'sync.fromHost.${e.pluralResourceClass}.selector'`})]})}function p(e={}){let{wrapper:s}={...(0,r.R)(),...e.components};return s?(0,a.jsx)(s,{...e,children:(0,a.jsx)(u,{...e})}):u(e)}},23279(e,s,n){n.d(s,{Ay:()=>t,RM:()=>c});var a=n(74848),r=n(28453),l=n(95310);let c=[];function i(e){let s={admonition:"admonition",...(0,r.R)(),...e.components};return(0,a.jsxs)(s.admonition,{title:"Supported Configurations",type:"info",children:[(e.hostNodes||e.privateNodes)&&(0,a.jsxs)("div",{children:["Running the control plane as a container with:",(0,a.jsxs)("ul",{className:"tenancy-list",children:[e.hostNodes&&(0,a.jsx)("li",{children:(0,a.jsx)("b",{children:(0,a.jsx)(l.A,{to:"/docs/vcluster/introduction/architecture#shared-nodes",children:"Shared Nodes"})})}),e.privateNodes&&(0,a.jsx)("li",{children:(0,a.jsx)("b",{children:(0,a.jsx)(l.A,{to:"/docs/vcluster/introduction/architecture#private-nodes",children:"Private Nodes"})})})]})]}),e.standalone&&(0,a.jsxs)("div",{children:["Running the control plane as a binary with ",(0,a.jsx)("b",{children:(0,a.jsx)(l.A,{to:"/docs/vcluster/deploy/control-plane/binary",children:"vCluster Standalone"})}),". When scaling with additional worker nodes, they are joined as ",(0,a.jsx)("b",{children:(0,a.jsx)(l.A,{to:"/docs/vcluster/introduction/architecture#private-nodes",children:"private nodes"})}),"."]})]})}function t(e={}){let{wrapper:s}={...(0,r.R)(),...e.components};return s?(0,a.jsx)(s,{...e,children:(0,a.jsx)(i,{...e})}):i(e)}},46123(e,s,n){n.r(s),n.d(s,{metadata:()=>a,default:()=>x,frontMatter:()=>d,contentTitle:()=>h,toc:()=>p,assets:()=>u});var a=JSON.parse('{"id":"configure/vcluster-yaml/sync/from-host/ingress-classes","title":"Ingress classes","description":"Configuration for IngressClasses in vCluster","source":"@site/vcluster_versioned_docs/version-0.35.0/configure/vcluster-yaml/sync/from-host/ingress-classes.mdx","sourceDirName":"configure/vcluster-yaml/sync/from-host","slug":"/configure/vcluster-yaml/sync/from-host/ingress-classes","permalink":"/docs/vcluster/0.35.0/configure/vcluster-yaml/sync/from-host/ingress-classes","draft":false,"unlisted":false,"editUrl":"https://github.com/loft-sh/vcluster-docs/edit/main/vcluster_versioned_docs/version-0.35.0/configure/vcluster-yaml/sync/from-host/ingress-classes.mdx","tags":[],"version":"0.35.0","sidebarPosition":4,"frontMatter":{"title":"Ingress classes","sidebar_label":"ingressClasses","sidebar_position":4,"description":"Configuration for IngressClasses in vCluster","sidebar_class_name":"host-nodes"},"sidebar":"siteSidebar","previous":{"title":"events","permalink":"/docs/vcluster/0.35.0/configure/vcluster-yaml/sync/from-host/events"},"next":{"title":"gateways","permalink":"/docs/vcluster/0.35.0/configure/vcluster-yaml/sync/from-host/gateways"}}'),r=n(74848),l=n(28453);
119function c(e){let s={code:"code",h2:"h2",h3:"h3",h4:"h4",h5:"h5",p:"p",...(0,l.R)(),...e.components},{Details:n}=s;return n||function(e,s){throw Error("Expected "+(s?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}("Details",!0),(0,r.jsxs)(n,{className:"config-field","data-expandable":"true",children:[(0,r.jsxs)("summary",{children:[(0,r.jsxs)(s.h2,{id:"ingressClasses",children:[(0,r.jsx)(s.code,{children:"ingressClasses"})," ",(0,r.jsx)("span",{className:"config-field-required","data-required":"false"})," ",(0,r.jsx)("span",{className:"config-field-type",children:"object"})," ",(0,r.jsx)("span",{className:"config-field-default"})," ",(0,r.jsx)("span",{className:"config-field-enum"})]}),(0,r.jsx)(s.p,{children:"IngressClasses defines if ingress classes should get synced from the host cluster to the virtual cluster, but not back."})]}),(0,r.jsx)(n,{className:"config-field","data-expandable":"false",open:!0,children:(0,r.jsxs)("summary",{children:[(0,r.jsxs)(s.h3,{id:"ingressClasses-enabled",children:[(0,r.jsx)(s.code,{children:"enabled"})," ",(0,r.jsx)("span",{className:"config-field-required","data-required":"false"})," ",(0,r.jsx)("span",{className:"config-field-type",children:"boolean"})," ",(0,r.jsx)("span",{className:"config-field-default",children:"false"})," ",(0,r.jsx)("span",{className:"config-field-enum"})]}),(0,r.jsx)(s.p,{children:"Enabled defines if this option should be enabled."})]})}),(0,r.jsxs)(n,{className:"config-field","data-expandable":"true",children:[(0,r.jsxs)("summary",{children:[(0,r.jsxs)(s.h3,{id:"ingressClasses-patches",children:[(0,r.jsx)(s.code,{children:"patches"})," ",(0,r.jsx)("span",{className:"config-field-required","data-required":"false"})," ",(0,r.jsx)("span",{className:"config-field-type",children:"object[]"})," ",(0,r.jsx)("span",{className:"config-field-default"})," ",(0,r.jsx)("span",{className:"config-field-enum"})]}),(0,r.jsx)(s.p,{children:"Patches patch the resource according to the provided specification."})]}),(0,r.jsx)(n,{className:"config-field","data-expandable":"false",open:!0,children:(0,r.jsxs)("summary",{children:[(0,r.jsxs)(s.h4,{id:"ingressClasses-patches-path",children:[(0,r.jsx)(s.code,{children:"path"})," ",(0,r.jsx)("span",{className:"config-field-required","data-required":"true",children:"required"})," ",(0,r.jsx)("span",{className:"config-field-type",children:"string"})," ",(0,r.jsx)("span",{className:"config-field-default"})," ",(0,r.jsx)("span",{className:"config-field-enum"})]}),(0,r.jsx)(s.p,{children:"Path is the path within the patch to target. If the path is not found within the patch, the patch is not applied."})]})}),(0,r.jsx)(n,{className:"config-field","data-expandable":"false",open:!0,children:(0,r.jsxs)("summary",{children:[(0,r.jsxs)(s.h4,{id:"ingressClasses-patches-expression",children:[(0,r.jsx)(s.code,{children:"expression"})," ",(0,r.jsx)("span",{className:"config-field-required","data-required":"false"})," ",(0,r.jsx)("span",{className:"config-field-type",children:"string"})," ",(0,r.jsx)("span",{className:"config-field-default"})," ",(0,r.jsx)("span",{className:"config-field-enum"})]}),(0,r.jsx)(s.p,{children:"Expression transforms the value according to the given JavaScript expression."})]})}),(0,r.jsx)(n,{className:"config-field","data-expandable":"false",open:!0,children:(0,r.jsxs)("summary",{children:[(0,r.jsxs)(s.h4,{id:"ingressClasses-patches-reverseExpression",children:[(0,r.jsx)(s.code,{children:"reverseExpression"})," ",(0,r.jsx)("span",{className:"config-field-required","data-required":"false"})," ",(0,r.jsx)("span",{className:"config-field-type",children:"string"})," ",(0,r.jsx)("span",{className:"config-field-default"})," ",(0,r.jsx)("span",{className:"config-field-enum"})]}),(0,r.jsx)(s.p,{children:"ReverseExpression transforms the value according to the given JavaScript expression."})]})}),(0,r.jsxs)(n,{className:"config-field","data-expandable":"true",children:[(0,r.jsxs)("summary",{children:[(0,r.jsxs)(s.h4,{id:"ingressClasses-patches-reference",children:[(0,r.jsx)(s.code,{children:"reference"})," ",(0,r.jsx)("span",{className:"config-field-required","data-required":"false"})," ",(0,r.jsx)("span",{className:"config-field-type",children:"object"})," ",(0,r.jsx)("span",{className:"config-field-default"})," ",(0,r.jsx)("span",{className:"config-field-enum"})]}),(0,r.jsx)(s.p,{children:'Reference treats the path value as a reference to another object and will rewrite it based on the chosen mode\nautomatically. In single-namespace mode this will translate the name to "vxxxxxxxxx" to avoid conflicts with\nother names, in multi-namespace mode this will not translate the name.'})]}),(0,r.jsx)(n,{className:"config-field","data-expandable":"false",open:!0,children:(0,r.jsxs)("summary",{children:[(0,r.jsxs)(s.h5,{id:"ingressClasses-patches-reference-apiVersion",children:[(0,r.jsx)(s.code,{children:"apiVersion"})," ",(0,r.jsx)("span",{className:"config-field-required","data-required":"true",children:"required"})," ",(0,r.jsx)("span",{className:"config-field-type",children:"string"})," ",(0,r.jsx)("span",{className:"config-field-default"})," ",(0,r.jsx)("span",{className:"config-field-enum"})]}),(0,r.jsx)(s.p,{children:"APIVersion is the apiVersion of the referenced object."})]})}),(0,r.jsx)(n,{className:"config-field","data-expandable":"false",open:!0,children:(0,r.jsxs)("summary",{children:[(0,r.jsxs)(s.h5,{id:"ingressClasses-patches-reference-apiVersionPath",children:[(0,r.jsx)(s.code,{children:"apiVersionPath"})," ",(0,r.jsx)("span",{className:"config-field-required","data-required":"false"})," ",(0,r.jsx)("span",{className:"config-field-type",children:"string"})," ",(0,r.jsx)("span",{className:"config-field-default"})," ",(0,r.jsx)("span",{className:"config-field-enum"})]}),(0,r.jsx)(s.p,{children:"APIVersionPath is optional relative path to use to determine the kind. If APIVersionPath is not found, will fallback to apiVersion."})]})}),(0,r.jsx)(n,{className:"config-field","data-expandable":"false",open:!0,children:(0,r.jsxs)("summary",{children:[(0,r.jsxs)(s.h5,{id:"ingressClasses-patches-reference-kind",children:[(0,r.jsx)(s.code,{children:"kind"})," ",(0,r.jsx)("span",{className:"config-field-required","data-required":"true",children:"required"})," ",(0,r.jsx)("span",{className:"config-field-type",children:"string"})," ",(0,r.jsx)("span",{className:"config-field-default"})," ",(0,r.jsx)("span",{className:"config-field-enum"})]}),(0,r.jsx)(s.p,{children:"Kind is the kind of the referenced object."})]})}),(0,r.jsx)(n,{className:"config-field","data-expandable":"false",open:!0,children:(0,r.jsxs)("summary",{children:[(0,r.jsxs)(s.h5,{id:"ingressClasses-patches-reference-kindPath",children:[(0,r.jsx)(s.code,{children:"kindPath"})," ",(0,r.jsx)("span",{className:"config-field-required","data-required":"false"})," ",(0,r.jsx)("span",{className:"config-field-type",children:"string"})," ",(0,r.jsx)("span",{className:"config-field-default"})," ",(0,r.jsx)("span",{className:"config-field-enum"})]}),(0,r.jsx)(s.p,{children:"KindPath is the optional relative path to use to determine the kind. If KindPath is not found, will fallback to kind."})]})}),(0,r.jsx)(n,{className:"config-field","data-expandable":"false",open:!0,children:(0,r.jsxs)("summary",{children:[(0,r.jsxs)(s.h5,{id:"ingressClasses-patches-reference-namePath",children:[(0,r.jsx)(s.code,{children:"namePath"})," ",(0,r.jsx)("span",{className:"config-field-required","data-required":"false"})," ",(0,r.jsx)("span",{className:"config-field-type",children:"string"})," ",(0,r.jsx)("span",{className:"config-field-default"})," ",(0,r.jsx)("span",{className:"config-field-enum"})]}),(0,r.jsx)(s.p,{children:"NamePath is the optional relative path to the reference name within the object."})]})}),(0,r.jsx)(n,{className:"config-field","data-expandable":"false",open:!0,children:(0,r.jsxs)("summary",{children:[(0,r.jsxs)(s.h5,{id:"ingressClasses-patches-reference-namespacePath",children:[(0,r.jsx)(s.code,{children:"namespacePath"})," ",(0,r.jsx)("span",{className:"config-field-required","data-required":"false"})," ",(0,r.jsx)("span",{className:"config-field-type",children:"string"})," ",(0,r.jsx)("span",{className:"config-field-default"})," ",(0,r.jsx)("span",{className:"config-field-enum"})]}),(0,r.jsx)(s.p,{children:"NamespacePath is the optional relative path to the reference namespace within the object. If omitted or not found, namespacePath equals to the\nmetadata.namespace path of the object."})]})})]}),(0,r.jsx)(n,{className:"config-field","data-expandable":"true",children:(0,r.jsxs)("summary",{children:[(0,r.jsxs)(s.h4,{id:"ingressClasses-patches-labels",children:[(0,r.jsx)(s.code,{children:"labels"})," ",(0,r.jsx)("span",{className:"config-field-required","data-required":"false"})," ",(0,r.jsx)("span",{className:"config-field-type",children:"object"})," ",(0,r.jsx)("span",{className:"config-field-default"})," ",(0,r.jsx)("span",{className:"config-field-enum"})]}),(0,r.jsx)(s.p,{children:"Labels treats the path value as a labels selector."})]})})]}),(0,r.jsxs)(n,{className:"config-field","data-expandable":"true",children:[(0,r.jsxs)("summary",{children:[(0,r.jsxs)(s.h3,{id:"ingressClasses-selector",children:[(0,r.jsx)(s.code,{children:"selector"})," ",(0,r.jsx)("span",{className:"config-field-required","data-required":"false"})," ",(0,r.jsx)("span",{className:"config-field-type",children:"object"})," ",(0,r.jsx)("span",{className:"config-field-default"})," ",(0,r.jsx)("span",{className:"config-field-enum"})]}),(0,r.jsx)(s.p,{children:"Selector defines the selector to use for the resource. If not set, all resources of that type will be synced."})]}),(0,r.jsx)(n,{className:"config-field","data-expandable":"false",open:!0,children:(0,r.jsx)("summary",{children:(0,r.jsxs)(s.h4,{id:"ingressClasses-selector-matchLabels",children:[(0,r.jsx)(s.code,{children:"matchLabels"})," ",(0,r.jsx)("span",{className:"config-field-required","data-required":"false"})," ",(0,r.jsx)("span",{className:"config-field-type",children:"object"})," ",(0,r.jsx)("span",{className:"config-field-default"})," ",(0,r.jsx)("span",{className:"config-field-enum"})]})})}),(0,r.jsxs)(n,{className:"config-field","data-expandable":"true",children:[(0,r.jsx)("summary",{children:(0,r.jsxs)(s.h4,{id:"ingressClasses-selector-matchExpressions",children:[(0,r.jsx)(s.code,{children:"matchExpressions"})," ",(0,r.jsx)("span",{className:"config-field-required","data-required":"false"})," ",(0,r.jsx)("span",{className:"config-field-type",children:"object[]"})," ",(0,r.jsx)("span",{className:"config-field-default"})," ",(0,r.jsx)("span",{className:"config-field-enum"})]})}),(0,r.jsx)(n,{className:"config-field","data-expandable":"false",open:!0,children:(0,r.jsx)("summary",{children:(0,r.jsxs)(s.h5,{id:"ingressClasses-selector-matchExpressions-key",children:[(0,r.jsx)(s.code,{children:"key"})," ",(0,r.jsx)("span",{className:"config-field-required","data-required":"false"})," ",(0,r.jsx)("span",{className:"config-field-type",children:"string"})," ",(0,r.jsx)("span",{className:"config-field-default"})," ",(0,r.jsx)("span",{className:"config-field-enum"})]})})}),(0,r.jsx)(n,{className:"config-field","data-expandable":"false",open:!0,children:(0,r.jsx)("summary",{children:(0,r.jsxs)(s.h5,{id:"ingressClasses-selector-matchExpressions-operator",children:[(0,r.jsx)(s.code,{children:"operator"})," ",(0,r.jsx)("span",{className:"config-field-required","data-required":"false"})," ",(0,r.jsx)("span",{className:"config-field-type",children:"string"})," ",(0,r.jsx)("span",{className:"config-field-default"})," ",(0,r.jsx)("span",{className:"config-field-enum"})]})})}),(0,r.jsx)(n,{className:"config-field","data-expandable":"false",open:!0,children:(0,r.jsx)("summary",{children:(0,r.jsxs)(s.h5,{id:"ingressClasses-selector-matchExpressions-values",children:[(0,r.jsx)(s.code,{children:"values"})," ",(0,r.jsx)("span",{className:"config-field-required","data-required":"false"})," ",(0,r.jsx)("span",{className:"config-field-type",children:"string[]"})," ",(0,r.jsx)("span",{className:"config-field-default"})," ",(0,r.jsx)("span",{className:"config-field-enum"})]})})})]})]})]})}function i(e={}){let{wrapper:s}={...(0,l.R)(),...e.components};return s?(0,r.jsx)(s,{...e,children:(0,r.jsx)(c,{...e})}):c(e)}var t=n(33141),o=n(23279);let d={title:"Ingress classes",sidebar_label:"ingressClasses",sidebar_position:4,description:"Configuration for IngressClasses in vCluster",sidebar_class_name:"host-nodes"},h,u={}
119,p=[...o.RM,...t.RM,{value:"Config reference",id:"config-reference",level:2},{value:'<code>ingressClasses</code> <span class="config-field-required"></span> <span class="config-field-type">object</span> <span class="config-field-default"></span> <span class="config-field-enum"></span>',id:"ingressClasses",level:2},{value:'<code>enabled</code> <span class="config-field-required"></span> <span class="config-field-type">boolean</span> <span class="config-field-default">false</span> <span class="config-field-enum"></span>',id:"ingressClasses-enabled",level:3},{value:'<code>patches</code> <span class="config-field-required"></span> <span class="config-field-type">object[]</span> <span class="config-field-default"></span> <span class="config-field-enum"></span>',id:"ingressClasses-patches",level:3},{value:'<code>path</code> <span class="config-field-required">required</span> <span class="config-field-type">string</span> <span class="config-field-default"></span> <span class="config-field-enum"></span>',id:"ingressClasses-patches-path",level:4},{value:'<code>expression</code> <span class="config-field-required"></span> <span class="config-field-type">string</span> <span class="config-field-default"></span> <span class="config-field-enum"></span>',id:"ingressClasses-patches-expression",level:4},{value:'<code>reverseExpression</code> <span class="config-field-required"></span> <span class="config-field-type">string</span> <span class="config-field-default"></span> <span class="config-field-enum"></span>',id:"ingressClasses-patches-reverseExpression",level:4},{value:'<code>reference</code> <span class="config-field-required"></span> <span class="config-field-type">object</span> <span class="config-field-default"></span> <span class="config-field-enum"></span>',id:"ingressClasses-patches-reference",level:4},{value:'<code>apiVersion</code> <span class="config-field-required">required</span> <span class="config-field-type">string</span> <span class="config-field-default"></span> <span class="config-field-enum"></span>',id:"ingressClasses-patches-reference-apiVersion",level:5},{value:'<code>apiVersionPath</code> <span class="config-field-required"></span> <span class="config-field-type">string</span> <span class="config-field-default"></span> <span class="config-field-enum"></span>',id:"ingressClasses-patches-reference-apiVersionPath",level:5},{value:'<code>kind</code> <span class="config-field-required">required</span> <span class="config-field-type">string</span> <span class="config-field-default"></span> <span class="config-field-enum"></span>',id:"ingressClasses-patches-reference-kind",level:5},{value:'<code>kindPath</code> <span class="config-field-required"></span> <span class="config-field-type">string</span> <span class="config-field-default"></span> <span class="config-field-enum"></span>',id:"ingressClasses-patches-reference-kindPath",level:5},{value:'<code>namePath</code> <span class="config-field-required"></span> <span class="config-field-type">string</span> <span class="config-field-default"></span> <span class="config-field-enum"></span>',id:"ingressClasses-patches-reference-namePath",level:5},{value:'<code>namespacePath</code> <span class="config-field-required"></span> <span class="config-field-type">string</span> <span class="config-field-default"></span> <span class="config-field-enum"></span>',id:"ingressClasses-patches-reference-namespacePath",level:5},{value:'<code>labels</code> <span class="config-field-required"></span> <span class="config-field-type">object</span> <span class="config-field-default"></span> <span class="config-field-enum"></span>',id:"ingressClasses-patches-labels",level:4},{value:'<code>selector</code> <span class="config-field-required"></span> <span class="config-field-type">object</span> <span class="config-field-default"></span> <span class="config-field-enum"></span>',id:"ingressClasses-selector",level:3},{value:'<code>matchLabels</code> <span class="config-field-required"></span> <span class="config-field-type">object</span> <span class="config-field-default"></span> <span class="config-field-enum"></span>',id:"ingressClasses-selector-matchLabels",level:4},{value:'<code>matchExpressions</code> <span class="config-field-required"></span> <span class="config-field-type">object[]</span> <span class="config-field-default"></span> <span class="config-field-enum"></span>',id:"ingressClasses-selector-matchExpressions",level:4},{value:'<code>key</code> <span class="config-field-required"></span> <span class="config-field-type">string</span> <span class="config-field-default"></span> <span class="config-field-enum"></span>',id:"ingressClasses-selector-matchExpressions-key",level:5},{value:'<code>operator</code> <span class="config-field-required"></span> <span class="config-field-type">string</span> <span class="config-field-default"></span> <span class="config-field-enum"></span>',id:"ingressClasses-selector-matchExpressions-operator",level:5},{value:'<code>values</code> <span class="config-field-required"></span> <span class="config-field-type">string[]</span> <span class="config-field-default"></span> <span class="config-field-enum"></span>',id:"ingressClasses-selector-matchExpressions-values",level:5}];function f(e){let s={h2:"h2",li:"li",p:"p",strong:"strong",ul:"ul",...(0,l.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o.Ay,{hostNodes:"true"}),"\n",(0,r.jsx)(s.p,{children:"By default, this is disabled."}),"\n",(0,r.jsx)(s.p,{children:"IngressClass syncing allows tenant cluster
119s to use ingress controllers from the control plane cluster. Typically, each tenant cluster needs its own ingress controller to handle incoming traffic. With IngressClass syncing enabled, tenant clusters can reference IngressClass resources from the control plane cluster instead."}),"\n",(0,r.jsx)(s.p,{children:"You can enable this feature to sync IngressClass resources from the control plane cluster to the tenant cluster. Add labels to IngressClass resources in your control plane cluster and configure vCluster to sync only those that match specific label selectors. When you create an Ingress resource in the tenant cluster that references a synced IngressClass, the control plane cluster's ingress controller handles the traffic routing."}),"\n",(0,r.jsx)(s.p,{children:"This saves resources since you don't need separate ingress controllers in every tenant cluster. It also gives you centralized control over which ingress capabilities teams can access."}),"\n",(0,r.jsx)(s.p,{children:"This approach is useful in scenarios where selective access to ingress configurations is required. Common use cases include:"}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"Development environments"}),": Sync only the IngressClass resources required for development clusters to reduce noise and avoid unnecessary exposure."]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"Tenant isolation"}),": Enable teams to use their own IngressClass resources while sharing a single control plane cluster."]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"Security"}),": Restrict the IngressClass resources available in the tenant cluster to enforce access control and prevent unintended configurations."]}),"\n"]}),"\n",(0,r.jsx)(t.Ay,{showResource:"true",lowercaseResource:"ingress",resource:"Ingress",pluralResource:"ingresses",lowercaseResourceClass:"ingressclass",resourceClass:"IngressClass",pluralResourceClass:"ingressClasses",resourceClassName:"IngressClassName",expressionKey:"kubernetes.io/ingress.class",expressionValue1:"istio",expressionValue2:"traefik"}),"\n",(0,r.jsx)(s.h2,{id:"config-reference",children:"Config reference"}),"\n",(0,r.jsx)(i,{})]})}function x(e={}){let{wrapper:s}={...(0,l.R)(),...e.components};return s?(0,r.jsx)(s,{...e,children:(0,r.jsx)(f,{...e})}):f(e)}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.