Skip to content

Commit

Permalink
Create README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
showurl committed Feb 11, 2023
1 parent 579ec44 commit bc35816
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions app/conn/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
### k8s通过NodePort方式获取真实IP

```yaml
apiVersion: v1
kind: Service
metadata:
labels:
app: conn-rpc
name: tcp-nodeport
namespace: xxim
spec:
externalTrafficPolicy: Local # 保证源IP不被改变
internalTrafficPolicy: Cluster
ipFamilies:
- IPv4
ipFamilyPolicy: SingleStack
ports:
- name: 8999-8999-tcp-3ku1mxcacoy
nodePort: 30007
port: 8999
protocol: TCP
targetPort: 8999
selector:
app: conn-rpc
sessionAffinity: None
type: NodePort
```

0 comments on commit bc35816

Please sign in to comment.