Skip to content

Commit f35510b

Browse files
committed
Add yaml files
1 parent 2f7649c commit f35510b

File tree

1 file changed

+37
-6
lines changed

1 file changed

+37
-6
lines changed

content/ngf/how-to/gateway-api-inference-extension.md

Lines changed: 37 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,19 @@ oci://registry.k8s.io/gateway-api-inference-extension/charts/inferencepool
7979

8080
1. Deploy Inference Gateway:
8181

82-
```shell
83-
kubectl apply -f https://raw.githubusercontent.com/nginx/nginx-gateway-fabric/v{{< version-ngf >}}/examples/inference/gateway.yaml
82+
```yaml
83+
kubectl apply -f - <<EOF
84+
apiVersion: gateway.networking.k8s.io/v1
85+
kind: Gateway
86+
metadata:
87+
name: inference-gateway
88+
spec:
89+
gatewayClassName: nginx
90+
listeners:
91+
- name: http
92+
port: 80
93+
protocol: HTTP
94+
EOF
8495
```
8596

8697
Confirm that the Gateway was assigned an IP address and reports a `Programmed=True` status:
@@ -98,8 +109,28 @@ GW_PORT=<port number>
98109

99110
2. Deploy the HTTPRoute:
100111

101-
```shell
102-
kubectl apply -f https://raw.githubusercontent.com/nginx/nginx-gateway-fabric/v{{< version-ngf >}}/examples/snippets-filter/httproute.yaml
112+
```yaml
113+
kubectl apply -f - <<EOF
114+
apiVersion: gateway.networking.k8s.io/v1
115+
kind: HTTPRoute
116+
metadata:
117+
name: llm-route
118+
spec:
119+
parentRefs:
120+
- group: gateway.networking.k8s.io
121+
kind: Gateway
122+
name: inference-gateway
123+
rules:
124+
- backendRefs:
125+
- group: inference.networking.k8s.io
126+
kind: InferencePool
127+
name: vllm-llama3-8b-instruct
128+
port: 3000
129+
matches:
130+
- path:
131+
type: PathPrefix
132+
value: /
133+
EOF
103134
```
104135

105136
Confirm that the HTTPRoute status conditions include `Accepted=True` and `ResolvedRefs=True`:
@@ -143,8 +174,8 @@ kubectl delete -k https://github.com/kubernetes-sigs/gateway-api-inference-exten
143174
3. Uninstall Inference Gateway and HTTPRoute:
144175

145176
```shell
146-
kubectl delete -f https://raw.githubusercontent.com/nginx/nginx-gateway-fabric/v{{< version-ngf >}}/examples/inference/gateway.yaml
147-
kubectl delete -f https://raw.githubusercontent.com/nginx/nginx-gateway-fabric/v{{< version-ngf >}}/examples/snippets-filter/httproute.yaml
177+
kubectl delete gateway inference-gateway
178+
kubectl delete httproute llm-route
148179
```
149180

150181
4. Uninstall NGINX Gateway Fabric:

0 commit comments

Comments
 (0)