I am using eks 1.16. I have one service which has type Loadbalancer with internet-facing.
apiVersion: v1
kind: Service
metadata:
annotations:
service.beta.kubernetes.io/aws-load-balancer-backend-protocol: tcp
service.beta.kubernetes.io/aws-load-balancer-type: nlb
name: kafka-test-3-0-external
labels:
helm.sh/chart: kafka-0.21.5
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/component: kafka-broker
app.kubernetes.io/name: kafka
app.kubernetes.io/instance: kafka-test-3
pod: "kafka-test-3-0"
spec:
type: LoadBalancer
ports:
- name: external-broker
port: 19092
targetPort: 19092
protocol: TCP
#
selector:
app.kubernetes.io/component: kafka-broker
app.kubernetes.io/name: kafka
app.kubernetes.io/instance: kafka-test-3
statefulset.kubernetes.io/pod-name: "kafka-test-3-0"
I want to provide elastic-ip/static-ip to that external service.
Problem: With Loadbalancer type, when I delete the service it will delete loadbalancer. When I install once again then it will create new load balancer with new ip.
Usecase: If I will uninstall/delete that service still the IP must be same.
How can I provide elastic-ip/static-ip?