GoogleCloudPlatform / k8s-multicluster-ingress

kubemci: Command line tool to configure L7 load balancers using multiple kubernetes clusters
Apache License 2.0
376 stars 68 forks source link

do nodePort validation before creating ingress #166

Closed ahmetb closed 6 years ago

ahmetb commented 6 years ago
$ kubemci create zone-printer \
    --ingress=ingress/ingress.yaml \
    --kubeconfig ~/workspace/junk/mci/clusters.yaml

Created Ingress in cluster: gke_ahmetb-samples-playground_asia-southeast1-a_cluster-3
Created Ingress in cluster: gke_ahmetb-samples-playground_europe-west1-c_cluster-2
Created Ingress in cluster: gke_ahmetb-samples-playground_southamerica-east1-c_cluster-4
Created Ingress in cluster: gke_ahmetb-samples-playground_us-central1-b_cluster-1
Error: Error in creating load balancer: validation failed: 1 error occurred:

* nodePort validation error for default backend service '{zoneprinterz {%!s(intstr.Type=0) %!s(int32=80) }}/default': Could not get service NodePort in cluster gke_ahmetb-samples-playground_asia-southeast1-a_cluster-3: could not find matching nodeport for backend {ServiceName:zoneprinterz ServicePort:{Type:0 IntVal:80 StrVal:}} and service default/zoneprinterz. Looking for port {Type:0 IntVal:80 StrVal:} in []
ahmetb commented 6 years ago

(FWIW in this case I had a typo on the backendService name on Ingress spec. You can reproduce that way)

nikhiljindal commented 6 years ago

cc @G-Harmon We just merged it: https://github.com/GoogleCloudPlatform/k8s-multicluster-ingress/pull/148!!

Feedback welcome :)

ahmetb commented 6 years ago

I've been trying the latest tagged version (0.3.0). Sorry about that. :)