Fix error message when Traefik fails to get an IP
Provide helpful error message if Traefik times out waiting for IP
@@ -128,14 +128,17 @@ func (k Traefik) apply(ctx context.Context, c *kubernetes.Cluster, ui *termui.UI
}
if err := c.WaitUntilPodBySelectorExist(ctx, ui, TraefikDeploymentID, "app.kubernetes.io/name=traefik", k.Timeout); err != nil {
- return errors.Wrap(err, "failed waiting Traefik Ingress deployment to exist")
+ return errors.Wrap(err, "failed waiting for Traefik Ingress deployment to exist")
}
if err := c.WaitForPodBySelectorRunning(ctx, ui, TraefikDeploymentID, "app.kubernetes.io/name=traefik", k.Timeout); err != nil {
- return errors.Wrap(err, "failed waiting Traefik Ingress deployment to come up")
+ return errors.Wrap(err, "failed waiting for Traefik Ingress deployment to come up")
}
if err := c.WaitUntilServiceHasLoadBalancer(ctx, ui, TraefikDeploymentID, "traefik", duration.ToServiceLoadBalancer()); err != nil {
- return errors.Wrap(err, "failed waiting for Traefik Ingress to have get a Load Balancer")
+ return errors.Wrap(err, "timed out waiting for LoadBalancer IP on traefik service\n" +
+ "Ensure your kubernetes platform has the ability to provision LoadBalancer IP address.\n\n" +
+ "Follow these steps to enable this ability\n" +
+ "https://github.com/epinio/epinio/blob/main/docs/user/howtos/provision_external_ip_for_local_kubernetes.md\n")
}
ui.Success().Msg("Traefik Ingress deployed")
