amazon ec2 - Exposing kubernetes service using elastic ip address on aws -
i'm trying figure out how run openvpn server running inside pod using udp protocol.
since it's easier test using http openvpn connections, have nginx-container running inside same pod openvpn-container is.
i can working inside cluster cannot expose nginx service internet using elastic ip.
network weave.
kubernetes version 1.6
i have set externalips-field in service.yaml elastic ip address. cannot use type loadbalancer since protocol udp.
service:
# kubectl describe service openvpn name: openvpn namespace: default labels: name=openvpn annotations: kubectl.kubernetes.io/last-applied-configuration={"apiversion":"v1","kind":"service","metadata":{"annotations":{},"labels":{"name":"openvpn"},"name":"openvpn","namespace":"default"},"spec":{"externali... selector: name=openvpn type: nodeport ip: 100.71.93.74 external ips: <my_elastic_ip> port: openvpn 1194/udp nodeport: openvpn 30726/udp endpoints: 100.120.0.1:1194 port: http 80/tcp nodeport: http 30000/tcp endpoints: 100.120.0.1:80 session affinity: none events: <none>
endpoints
# kubectl endpoints openvpn name endpoints age openvpn 100.120.0.1:80,100.120.0.1:1194 20h
i have followed through https://kubernetes.io/docs/tasks/debug-application-cluster/debug-service/ , works inside cluster.
i have allocated elastic ip specific instance manually using aws console. security groups updated.
so possible connect pod inside kubernetes cluster using elastic ip attached host node? if is, how that?
you can try nodeport type. following can access service via ip-node:30080
apiversion: v1 kind: service metadata: labels: app: app name: app-service namespace: default spec: ports: - name: ext nodeport: 30080 protocol: udp port: 80 selector: app: app type: nodeport
Comments
Post a Comment