I've been using a kubernetes ingress config file to assign a static external ip address created by GCP. The ingress and the deployment are managed by GKE.
apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
name: test-ingress
annotations:
kubernetes.io/ingress.global-static-ip-name: test-address
spec:
backend:
serviceName: test-service
servicePort: 80
As @MattBrowne said in the comments, needs to be global IP and not regional. This also fixed for me.
"
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.