A service points to an external IP
kdeng opened this issue · comments
This is a service definition, which creates a service in LB type, and points the service to an external IP.
---
apiVersion: v1
kind: Service
metadata:
name: my-service
spec:
ports:
- name: http
port: 8080
protocol: TCP
targetPort: 8080
type: LoadBalancer
---
apiVersion: v1
kind: Endpoints
metadata:
name: my-service
subsets:
- addresses:
- ip: xxx.xxx.xxx.xxx
ports:
- name: http
port: 8080
protocol: TCP