Closed
Description
Kubernetes version (use kubectl version
):
Kubernetes 1.5.1
Environment:
- GKE
What happened:
After I federated several clusters, all federated services work fine (replica sets, services) except for ingress.
What you expected to happen:
Ingress does not get propagated across all clusters
$ for c in $(kubectl config view -o jsonpath='{.contexts[*].name}'); do echo $c; kubectl --context=$c get ingress; done
federation
NAME HOSTS ADDRESS PORTS AGE
k8shserver * 130.211.40.125 80 44m
gke_container-solutions_asia-east1-a_gce-asia-east1-a
No resources found.
gke_container-solutions_asia-northeast1-a_gce-asia-northeast1-a
No resources found.
gke_container-solutions_europe-west1-b_gce-europe-west1-b
No resources found.
gke_container-solutions_us-central1-a_gce-us-central1-a
No resources found.
gke_container-solutions_us-east1-b_gce-us-east1-b
NAME HOSTS ADDRESS PORTS AGE
k8shserver * 130.211.40.125 80 45m
gke_container-solutions_us-west1-a_gce-us-west1-a
No resources found.
Here are controller's log (run with -v=4
flag)
https://gist.github.com/anonymous/a51ce3266f97a4103c6d47aabf76c228
How to reproduce it (as minimally and precisely as possible):
(all commands used to set it up are in https://github.com/ContainerSolutions/k8shserver/tree/master/scripts)
- create a few GKE clusters
- initlialize federation
kubefed init federation --image=gcr.io/google_containers/hyperkube-amd64:v1.5.1 --host-cluster-context=gke_container-solutions_us-east1-b_gce-us-east1-b --dns-zone-name=infra.container-solutions.com
- applied a firewall workaround suggested by @madhusudancs (Federated ingress creates flapping backends and health checks #36327 (comment))
gcloud compute firewall-rules create my-federated-ingress-firewall-rule --source-ranges 130.211.0.0/22 --allow tcp:80 --network default
- verified that clusters are in
Ready
state$ kubectl --context=federation get clusters NAME STATUS AGE cluster-asia-east1-a Ready 55m cluster-asia-northeast1-a Ready 55m cluster-europe-west1-b Ready 55m cluster-us-central1-a Ready 55m cluster-us-east1-b Ready 55m cluster-us-west1-a Ready 55m
- successfully deployed a federated service
$ for c in $(kubectl config view -o jsonpath='{.contexts[*].name}'); do echo $c; kubectl --context=$c get services; done
federation
NAME CLUSTER-IP EXTERNAL-IP PORT(S) AGE
k8shserver 104.196.209.210 80/TCP 39m
gke_container-solutions_asia-east1-a_gce-asia-east1-a
NAME CLUSTER-IP EXTERNAL-IP PORT(S) AGE
k8shserver 10.195.248.129 107.167.190.124 80:31957/TCP 39m
kubernetes 10.195.240.1 <none> 443/TCP 3h
gke_container-solutions_asia-northeast1-a_gce-asia-northeast1-a
NAME CLUSTER-IP EXTERNAL-IP PORT(S) AGE
k8shserver 10.199.251.248 104.198.126.154 80:31367/TCP 39m
kubernetes 10.199.240.1 <none> 443/TCP 3h
gke_container-solutions_europe-west1-b_gce-europe-west1-b
NAME CLUSTER-IP EXTERNAL-IP PORT(S) AGE
k8shserver 10.115.252.33 104.199.88.10 80:32418/TCP 39m
kubernetes 10.115.240.1 <none> 443/TCP 3h
gke_container-solutions_us-central1-a_gce-us-central1-a
NAME CLUSTER-IP EXTERNAL-IP PORT(S) AGE
k8shserver 10.215.251.137 104.154.23.67 80:32695/TCP 39m
kubernetes 10.215.240.1 <none> 443/TCP 3h
gke_container-solutions_us-east1-b_gce-us-east1-b
NAME CLUSTER-IP EXTERNAL-IP PORT(S) AGE
k8shserver 10.211.244.237 104.196.209.210 80:32665/TCP 39m
kubernetes 10.211.240.1 <none> 443/TCP 3h
gke_container-solutions_us-west1-a_gce-us-west1-a
NAME CLUSTER-IP EXTERNAL-IP PORT(S) AGE
k8shserver 10.35.246.12 104.198.7.151 80:32714/TCP 39m
kubernetes 10.35.240.1 <none> 443/TCP 3h
Metadata
Metadata
Assignees
Labels
No labels