You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
All resources within the same gateway group must use the same IngressClass (for Ingress / APISIX CRDs) or Gateway (for Gateway API), each of which points to a single GatewayProxy.
58
+
59
+
Using multiple GatewayProxy, IngressClass, or Gateway resources for a single gateway group can lead to conflicts and unintended resource overwrites.
60
+
61
+
:::
62
+
55
63
## Define Controller and Gateway
56
64
57
65
To specify the controller responsible for handling resources before applying further configurations:
@@ -94,7 +102,7 @@ spec:
94
102
name: apisix-config # 5
95
103
```
96
104
97
-
❶ The controllerName field in GatewayClass needs to be customized if you are running multiple distinct instances of the APISIX Ingress Controller in the same cluster (not a single instance with multiple replicas). Each ingress controller instance must use a unique controllerName in its [configuration file](configuration-file.md), and the corresponding GatewayClass should reference that value.
105
+
❶ The controller name should be customized if you are running multiple distinct instances of the APISIX Ingress Controller in the same cluster (not a single instance with multiple replicas). Each ingress controller instance must use a unique controllerName in its [configuration file](configuration-file.md), and the corresponding GatewayClass should reference that value.
98
106
99
107
❷ The `port` in the Gateway listener is required but ignored. This is due to limitations in the data plane: it cannot dynamically open new ports. Since the Ingress Controller does not manage the data plane deployment, it cannot automatically update the configuration or restart the data plane to apply port changes.
❹ Name of the referenced resource. Should match the `metadata.name` of the GatewayProxy resource.
170
+
171
+
❺ Namespace where the referenced resource is defined.
172
+
173
+
❻ Scope of the referenced resource.
174
+
147
175
</TabItem>
148
176
149
177
</Tabs>
@@ -836,6 +864,15 @@ metadata:
836
864
namespace: ingress-apisix
837
865
name: apisix-config
838
866
spec:
867
+
provider:
868
+
type: ControlPlane
869
+
controlPlane:
870
+
endpoints:
871
+
- https://xxx.xxx.xxx.xxx:7443 # update with your CP endpoint
872
+
auth:
873
+
type: AdminKey
874
+
adminKey:
875
+
value: xxxxxxxxxxx # update with your admin key
839
876
plugins:
840
877
- name: clickhouse-logger
841
878
config:
@@ -894,6 +931,15 @@ metadata:
894
931
namespace: ingress-apisix
895
932
name: apisix-config
896
933
spec:
934
+
provider:
935
+
type: ControlPlane
936
+
controlPlane:
937
+
endpoints:
938
+
- https://xxx.xxx.xxx.xxx:7443 # update with your CP endpoint
939
+
auth:
940
+
type: AdminKey
941
+
adminKey:
942
+
value: xxxxxxxxxxx # update with your admin key
897
943
pluginMetadata:
898
944
opentelemetry: {
899
945
"trace_id_source": "x-request-id",
@@ -1023,6 +1069,154 @@ spec:
1023
1069
1024
1070
</Tabs>
1025
1071
1072
+
## Configure Downstream (m)TLS
1073
+
1074
+
To configure downstream TLS:
1075
+
1076
+
<Tabs
1077
+
groupId="k8s-api"
1078
+
defaultValue="gateway"
1079
+
values={[
1080
+
{label: 'Gateway API', value: 'gateway'},
1081
+
{label: 'APISIX CRD', value: 'apisix-crd'},
1082
+
]}>
1083
+
1084
+
<TabItem value="gateway">
1085
+
1086
+
```yaml
1087
+
apiVersion: v1
1088
+
kind: Secret
1089
+
metadata:
1090
+
namespace: api7
1091
+
name: test-tls-secret
1092
+
type: kubernetes.io/tls
1093
+
data:
1094
+
tls.crt: <base64-encoded cert>
1095
+
tls.key: <base64-encoded key>
1096
+
---
1097
+
apiVersion: gateway.networking.k8s.io/v1
1098
+
kind: Gateway
1099
+
metadata:
1100
+
namespace: api7
1101
+
name: apisix
1102
+
spec:
1103
+
gatewayClassName: apisix
1104
+
listeners:
1105
+
- name: https
1106
+
protocol: HTTPS
1107
+
port: 443
1108
+
hostname: apisix.test
1109
+
tls:
1110
+
certificateRefs:
1111
+
- kind: Secret
1112
+
group: ""
1113
+
name: test-tls-secret
1114
+
infrastructure:
1115
+
parametersRef:
1116
+
group: apisix.apache.org
1117
+
kind: GatewayProxy
1118
+
name: apisix-proxy-config
1119
+
```
1120
+
1121
+
:::note
1122
+
1123
+
The `port` in the Gateway listener is required but ignored. This is due to limitations in the data plane: it cannot dynamically open new ports. Since the Ingress Controller does not manage the data plane deployment, it cannot automatically update the configuration or restart the data plane to apply port changes.
1124
+
1125
+
:::
1126
+
1127
+
</TabItem>
1128
+
1129
+
<TabItem value="apisix-crd">
1130
+
1131
+
```yaml
1132
+
apiVersion: v1
1133
+
kind: Secret
1134
+
metadata:
1135
+
namespace: api7
1136
+
name: test-tls-secret
1137
+
type: kubernetes.io/tls
1138
+
data:
1139
+
tls.crt: <base64-encoded cert>
1140
+
tls.key: <base64-encoded key>
1141
+
---
1142
+
apiVersion: apisix.apache.org/v2
1143
+
kind: ApisixTls
1144
+
metadata:
1145
+
namespace: api7
1146
+
name: test-tls
1147
+
spec:
1148
+
ingressClassName: apisix-tls
1149
+
hosts:
1150
+
- apisix.test
1151
+
secret:
1152
+
name: test-tls-secret
1153
+
namespace: api7
1154
+
```
1155
+
1156
+
</TabItem>
1157
+
1158
+
</Tabs>
1159
+
1160
+
To configure downstream mTLS:
1161
+
1162
+
<Tabs
1163
+
groupId="k8s-api"
1164
+
defaultValue="gateway"
1165
+
values={[
1166
+
{label: 'Gateway API', value: 'gateway'},
1167
+
{label: 'APISIX CRD', value: 'apisix-crd'},
1168
+
]}>
1169
+
1170
+
<TabItem value="gateway">
1171
+
1172
+
Not supported.
1173
+
1174
+
</TabItem>
1175
+
1176
+
<TabItem value="apisix-crd">
1177
+
1178
+
```yaml
1179
+
apiVersion: v1
1180
+
kind: Secret
1181
+
metadata:
1182
+
namespace: api7
1183
+
name: test-mtls-secret
1184
+
type: kubernetes.io/tls
1185
+
data:
1186
+
tls.crt: <base64-encoded cert>
1187
+
tls.key: <base64-encoded key>
1188
+
---
1189
+
apiVersion: v1
1190
+
kind: Secret
1191
+
metadata:
1192
+
namespace: api7
1193
+
name: test-ca-secret
1194
+
data:
1195
+
cert: <base64-encoded caCert>
1196
+
---
1197
+
apiVersion: apisix.apache.org/v2
1198
+
kind: ApisixTls
1199
+
metadata:
1200
+
namespace: api7
1201
+
name: test-mtls
1202
+
spec:
1203
+
ingressClassName: apisix-tls
1204
+
hosts:
1205
+
- apisix.test
1206
+
secret:
1207
+
name: test-mtls-secret
1208
+
namespace: api7
1209
+
client:
1210
+
caSecret:
1211
+
name: test-ca-secret
1212
+
namespace: api7
1213
+
depth: 1
1214
+
```
1215
+
1216
+
</TabItem>
1217
+
1218
+
</Tabs>
1219
+
1026
1220
## Configure Gateway Access Information
1027
1221
1028
1222
These configurations allow Ingress Controller users to access the gateway.
@@ -1047,6 +1241,15 @@ metadata:
1047
1241
namespace: ingress-apisix
1048
1242
name: apisix-config
1049
1243
spec:
1244
+
provider:
1245
+
type: ControlPlane
1246
+
controlPlane:
1247
+
endpoints:
1248
+
- https://xxx.xxx.xxx.xxx:7443 # update with your CP endpoint
1249
+
auth:
1250
+
type: AdminKey
1251
+
adminKey:
1252
+
value: xxxxxxxxxxx # update with your admin key
1050
1253
statusAddress:
1051
1254
- 10.24.87.13
1052
1255
```
@@ -1066,6 +1269,15 @@ metadata:
1066
1269
namespace: ingress-apisix
1067
1270
name: apisix-config
1068
1271
spec:
1272
+
provider:
1273
+
type: ControlPlane
1274
+
controlPlane:
1275
+
endpoints:
1276
+
- https://xxx.xxx.xxx.xxx:7443 # update with your CP endpoint
1277
+
auth:
1278
+
type: AdminKey
1279
+
adminKey:
1280
+
value: xxxxxxxxxxx # update with your admin key
1069
1281
statusAddress:
1070
1282
- 10.24.87.13
1071
1283
```
@@ -1079,6 +1291,15 @@ metadata:
1079
1291
namespace: ingress-apisix
1080
1292
name: apisix-config
1081
1293
spec:
1294
+
provider:
1295
+
type: ControlPlane
1296
+
controlPlane:
1297
+
endpoints:
1298
+
- https://xxx.xxx.xxx.xxx:7443 # update with your CP endpoint
0 commit comments