Skip to content

Commit 1510635

Browse files
committed
[fix] port number 8001 -> 5001
1 parent 80d1892 commit 1510635

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

content/guides/python/deploy.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ spec:
132132
- name: POSTGRES_PORT
133133
value: "5432"
134134
ports:
135-
- containerPort: 8001
135+
- containerPort: 5001
136136
---
137137
apiVersion: v1
138138
kind: Service
@@ -144,8 +144,8 @@ spec:
144144
selector:
145145
service: fastapi
146146
ports:
147-
- port: 8001
148-
targetPort: 8001
147+
- port: 5001
148+
targetPort: 5001
149149
nodePort: 30001
150150
```
151151

@@ -160,7 +160,7 @@ In these Kubernetes YAML file, there are various objects, separated by the `---`
160160
- A PersistentVolumeClaim, to define a storage that will be persistent through restarts for the database.
161161
- A Secret, Keeping the database password as a example using secret kubernetes resource.
162162
- A NodePort service, which will route traffic from port 30001 on your host to
163-
port 8001 inside the pods it routes to, allowing you to reach your app
163+
port 5001 inside the pods it routes to, allowing you to reach your app
164164
from the network.
165165

166166
To learn more about Kubernetes objects, see the [Kubernetes documentation](https://kubernetes.io/docs/home/).
@@ -226,7 +226,7 @@ To learn more about Kubernetes objects, see the [Kubernetes documentation](https
226226
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
227227
kubernetes ClusterIP 10.43.0.1 <none> 443/TCP 13h
228228
postgres ClusterIP 10.43.209.25 <none> 5432/TCP 3m10s
229-
service-entrypoint NodePort 10.43.67.120 <none> 8001:30001/TCP 79s
229+
service-entrypoint NodePort 10.43.67.120 <none> 5001:30001/TCP 79s
230230
```
231231

232232
In addition to the default `kubernetes` service, you can see your `service-entrypoint` service, accepting traffic on port 30001/TCP and the internal `ClusterIP` `postgres` with the port `5432` open to accept connections from you python app.

0 commit comments

Comments
 (0)