使用 HELM 在 Kubernetes 中安装时出现 Consul 问题

问题描述 投票:0回答:1

我正在尝试在 Kubernetes 中安装 consul 作为客户端,并将其加入到我现有的 Consul 服务器中。当我检查

consul-consul-connect-injector
pod 的日志时,我看到服务器已成功连接

[INFO]  consul-server-connection-manager.consul-server-connection-manager: trying to connect to a Consul server
[INFO]  consul-server-connection-manager.consul-server-connection-manager: current prioritized list of known Consul servers: addresses=[192.168.60.10:8502]
[INFO]  consul-server-connection-manager.consul-server-connection-manager: connected to Consul server: address=192.168.60.10:8502
[INFO]  consul-server-connection-manager.consul-server-connection-manager: updated known Consul servers from watch stream: addresses=[192.168.60.10:8502]
[INFO]  consul-server-connection-manager.consul-server-connection-manager: updated known Consul servers from watch stream: addresses=[192.168.60.10:8502]

但是,在这个过程中我收到以下错误:

ERROR   error fetching config entries for kind: http-route      {"error": "Get \"http://192.168.60.10:8501/v1/config/http-route?dc=dc1\": context canceled"}
github.com/hashicorp/consul-k8s/control-plane/api-gateway/cache.(*Cache).subscribeToConsul
        /home/runner/work/consul-k8s/consul-k8s/control-plane/api-gateway/cache/consul.go:223
github.com/hashicorp/consul-k8s/control-plane/api-gateway/cache.(*Cache).Run.func1
        /home/runner/work/consul-k8s/consul-k8s/control-plane/api-gateway/cache/consul.go:188
2024-09-01T11:11:10.889Z        ERROR   error fetching config entries for kind: api-gateway     {"error": "Get \"http://192.168.60.10:8501/v1/config/api-gateway?dc=dc1\": context canceled"}
github.com/hashicorp/consul-k8s/control-plane/api-gateway/cache.(*Cache).subscribeToConsul
        /home/runner/work/consul-k8s/consul-k8s/control-plane/api-gateway/cache/consul.go:223
github.com/hashicorp/consul-k8s/control-plane/api-gateway/cache.(*Cache).Run.func1
        /home/runner/work/consul-k8s/consul-k8s/control-plane/api-gateway/cache/consul.go:188
2024-09-01T11:11:10.889Z        ERROR   error fetching config entries for kind: jwt-provider    {"error": "Get \"http://192.168.60.10:8501/v1/config/jwt-provider?dc=dc1\": context canceled"}
github.com/hashicorp/consul-k8s/control-plane/api-gateway/cache.(*Cache).subscribeToConsul
        /home/runner/work/consul-k8s/consul-k8s/control-plane/api-gateway/cache/consul.go:223
github.com/hashicorp/consul-k8s/control-plane/api-gateway/cache.(*Cache).Run.func1
        /home/runner/work/consul-k8s/consul-k8s/control-plane/api-gateway/cache/consul.go:188
2024-09-01T11:11:10.889Z        ERROR   error fetching config entries for kind: tcp-route       {"error": "Get \"http://192.168.60.10:8501/v1/config/tcp-route?dc=dc1\": context canceled"}
github.com/hashicorp/consul-k8s/control-plane/api-gateway/cache.(*Cache).subscribeToConsul
        /home/runner/work/consul-k8s/consul-k8s/control-plane/api-gateway/cache/consul.go:223
github.com/hashicorp/consul-k8s/control-plane/api-gateway/cache.(*Cache).Run.func1
        /home/runner/work/consul-k8s/consul-k8s/control-plane/api-gateway/cache/consul.go:188
2024-09-01T11:11:10.889Z        ERROR   error fetching config entries for kind: file-system-certificate {"error": "Get \"http://192.168.60.10:8501/v1/config/file-system-certificate?dc=dc1\": context canceled"}
github.com/hashicorp/consul-k8s/control-plane/api-gateway/cache.(*Cache).subscribeToConsul
        /home/runner/work/consul-k8s/consul-k8s/control-plane/api-gateway/cache/consul.go:223
github.com/hashicorp/consul-k8s/control-plane/api-gateway/cache.(*Cache).Run.func1
        /home/runner/work/consul-k8s/consul-k8s/control-plane/api-gateway/cache/consul.go:188
2024-09-01T11:11:10.891Z        INFO    starting server {"kind": "health probe", "addr": "[::]:9445"}
2024-09-01T11:11:10.987Z        INFO    controller-runtime.webhook      Starting webhook server
2024-09-01T11:11:10.988Z        INFO    controller-runtime.certwatcher  Updated current TLS certificate
2024-09-01T11:11:10.988Z        INFO    controller-runtime.webhook      Serving webhook server  {"host": "", "port": 8080}
2024-09-01T11:11:10.988Z        INFO    controller-runtime.certwatcher  Starting certificate watcher
2024-09-01T11:11:11.588Z        INFO    attempting to acquire leader lease consul/consul-controller-lock...

2024-09-01T11:11:11.587Z        INFO    Stopping and waiting for non leader election runnables
2024-09-01T11:11:11.588Z        INFO    Stopping and waiting for leader election runnables
2024-09-01T11:11:11.589Z        INFO    Starting EventSource    {"controller": "endpoints", "controllerGroup": "", "controllerKind": "Endpoints", "source": "kind source: *v1.Endpoints"}
2024-09-01T11:11:11.589Z        INFO    Starting Controller     {"controller": "endpoints", "controllerGroup": "", "controllerKind": "Endpoints"}
2024-09-01T11:11:11.589Z        INFO    Starting EventSource    {"controller": "gatewayclass", "controllerGroup": "gateway.networking.k8s.io", "controllerKind": "GatewayClass", "source": "kind source: *v1beta1.GatewayClass"}
2024-09-01T11:11:11.589Z        INFO    Starting EventSource    {"controller": "gatewayclass", "controllerGroup": "gateway.networking.k8s.io", "controllerKind": "GatewayClass", "source": "kind source: *v1alpha1.GatewayClassConfig"}
2024-09-01T11:11:11.687Z        INFO    Starting EventSource    {"controller": "servicedefaults", "controllerGroup": "consul.hashicorp.com", "controllerKind": "ServiceDefaults", "source": "kind source: *v1alpha1.ServiceDefaults"}
2024-09-01T11:11:11.687Z        INFO    Starting Controller     {"controller": "servicedefaults", "controllerGroup": "consul.hashicorp.com", "controllerKind": "ServiceDefaults"}
2024-09-01T11:11:11.687Z        INFO    Starting EventSource    {"controller": "gateway", "controllerGroup": "gateway.networking.k8s.io", "controllerKind": "Gateway", "source": "kind source: *v1beta1.Gateway"}
2024-09-01T11:11:11.687Z        INFO    Starting EventSource    {"controller": "gateway", "controllerGroup": "gateway.networking.k8s.io", "controllerKind": "Gateway", "source": "kind source: *v1.Deployment"}
2024-09-01T11:11:11.687Z        INFO    Starting EventSource    {"controller": "gateway", "controllerGroup": "gateway.networking.k8s.io", "controllerKind": "Gateway", "source": "kind source: *v1alpha2.TCPRoute"}
2024-09-01T11:11:11.687Z        INFO    Starting EventSource    {"controller": "gateway", "controllerGroup": "gateway.networking.k8s.io", "controllerKind": "Gateway", "source": "kind source: *v1.Secret"}
2024-09-01T11:11:11.688Z        INFO    Starting EventSource    {"controller": "servicerouter", "controllerGroup": "consul.hashicorp.com", "controllerKind": "ServiceRouter", "source": "kind source: *v1alpha1.ServiceRouter"}
2024-09-01T11:11:11.688Z        INFO    Stopping and waiting for caches
2024-09-01T11:11:11.689Z        ERROR   controller-runtime.source.EventHandler  failed to get informer from cache       {"error": "Timeout: failed waiting for *v1.Endpoints Informer to sync"}
sigs.k8s.io/controller-runtime/pkg/internal/source.(*Kind).Start.func1.1
        /home/runner/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/source/kind.go:68
k8s.io/apimachinery/pkg/util/wait.loopConditionUntilContext.func1
        /home/runner/go/pkg/mod/k8s.io/[email protected]/pkg/util/wait/loop.go:49
k8s.io/apimachinery/pkg/util/wait.loopConditionUntilContext
        /home/runner/go/pkg/mod/k8s.io/[email protected]/pkg/util/wait/loop.go:50
k8s.io/apimachinery/pkg/util/wait.PollUntilContextCancel
        /home/runner/go/pkg/mod/k8s.io/[email protected]/pkg/util/wait/poll.go:33
sigs.k8s.io/controller-runtime/pkg/internal/source.(*Kind).Start.func1
        /home/runner/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/source/kind.go:56
2024-09-01T11:11:11.689Z        ERROR   controller-runtime.source.EventHandler  failed to get informer from cache       {"error": "Timeout: failed waiting for *v1.Endpoints Informer to sync"}
sigs.k8s.io/controller-runtime/pkg/internal/source.(*Kind).Start.func1.1
        /home/runner/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/source/kind.go:68
k8s.io/apimachinery/pkg/util/wait.loopConditionUntilContext.func1
        /home/runner/go/pkg/mod/k8s.io/[email protected]/pkg/util/wait/loop.go:49
k8s.io/apimachinery/pkg/util/wait.loopConditionUntilContext
        /home/runner/go/pkg/mod/k8s.io/[email protected]/pkg/util/wait/loop.go:50
k8s.io/apimachinery/pkg/util/wait.PollUntilContextCancel
        /home/runner/go/pkg/mod/k8s.io/[email protected]/pkg/util/wait/poll.go:33
sigs.k8s.io/controller-runtime/pkg/internal/source.(*Kind).Start.func1
        /home/runner/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/source/kind.go:56
2024-09-01T11:11:11.689Z        ERROR   controller-runtime.source.EventHandler  failed to get informer from cache       {"error": "Timeout: failed waiting for *v1alpha1.ServiceDefaults Informer to sync"}
sigs.k8s.io/controller-runtime/pkg/internal/source.(*Kind).Start.func1.1
        /home/runner/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/source/kind.go:68
k8s.io/apimachinery/pkg/util/wait.loopConditionUntilContext.func1
        /home/runner/go/pkg/mod/k8s.io/[email protected]/pkg/util/wait/loop.go:49
k8s.io/apimachinery/pkg/util/wait.loopConditionUntilContext
        /home/runner/go/pkg/mod/k8s.io/[email protected]/pkg/util/wait/loop.go:50
k8s.io/apimachinery/pkg/util/wait.PollUntilContextCancel
        /home/runner/go/pkg/mod/k8s.io/[email protected]/pkg/util/wait/poll.go:33
sigs.k8s.io/controller-runtime/pkg/internal/source.(*Kind).Start.func1
        /home/runner/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/source/kind.go:56
2024-09-01T11:11:11.689Z        ERROR   controller-runtime.source.EventHandler  failed to get informer from cache       {"error": "Timeout: failed waiting for *v1alpha1.GatewayClassConfig Informer to sync"}
sigs.k8s.io/controller-runtime/pkg/internal/source.(*Kind).Start.func1.1
        /home/runner/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/source/kind.go:68
k8s.io/apimachinery/pkg/util/wait.loopConditionUntilContext.func1
        /home/runner/go/pkg/mod/k8s.io/[email protected]/pkg/util/wait/loop.go:49
k8s.io/apimachinery/pkg/util/wait.loopConditionUntilContext
        /home/runner/go/pkg/mod/k8s.io/[email protected]/pkg/util/wait/loop.go:50
k8s.io/apimachinery/pkg/util/wait.PollUntilContextCancel
        /home/runner/go/pkg/mod/k8s.io/[email protected]/pkg/util/wait/poll.go:33
sigs.k8s.io/controller-runtime/pkg/internal/source.(*Kind).Start.func1
        /home/runner/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/source/kind.go:56
2024-09-01T11:11:11.689Z        ERROR   controller-runtime.source.EventHandler  failed to get informer from cache       {"error": "Timeout: failed waiting for *v1alpha1.RouteAuthFilter Informer to sync"}
sigs.k8s.io/controller-runtime/pkg/internal/source.(*Kind).Start.func1.1
        /home/runner/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/source/kind.go:68
k8s.io/apimachinery/pkg/util/wait.loopConditionUntilContext.func1
        /home/runner/go/pkg/mod/k8s.io/[email protected]/pkg/util/wait/loop.go:49
k8s.io/apimachinery/pkg/util/wait.loopConditionUntilContext
        /home/runner/go/pkg/mod/k8s.io/[email protected]/pkg/util/wait/loop.go:50
k8s.io/apimachinery/pkg/util/wait.PollUntilContextCancel
        /home/runner/go/pkg/mod/k8s.io/[email protected]/pkg/util/wait/poll.go:33
sigs.k8s.io/controller-runtime/pkg/internal/source.(*Kind).Start.func1
        /home/runner/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/source/kind.go:56
2024-09-01T11:11:11.689Z        ERROR   controller-runtime.source.EventHandler  failed to get informer from cache       {"error": "Timeout: failed waiting for *v1.Secret Informer to sync"}
sigs.k8s.io/controller-runtime/pkg/internal/source.(*Kind).Start.func1.1
        /home/runner/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/source/kind.go:68
k8s.io/apimachinery/pkg/util/wait.loopConditionUntilContext.func1
        /home/runner/go/pkg/mod/k8s.io/[email protected]/pkg/util/wait/loop.go:49
k8s.io/apimachinery/pkg/util/wait.loopConditionUntilContext
        /home/runner/go/pkg/mod/k8s.io/[email protected]/pkg/util/wait/loop.go:50
k8s.io/apimachinery/pkg/util/wait.PollUntilContextCancel
        /home/runner/go/pkg/mod/k8s.io/[email protected]/pkg/util/wait/poll.go:33
sigs.k8s.io/controller-runtime/pkg/internal/source.(*Kind).Start.func1
        /home/runner/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/source/kind.go:56
2024-09-01T11:11:11.689Z        INFO    Stopping and waiting for webhooks
2024-09-01T11:11:11.689Z        ERROR   controller-runtime.source.EventHandler  failed to get informer from cache       {"error": "Timeout: failed waiting for *v1.Service Informer to sync"}
sigs.k8s.io/controller-runtime/pkg/internal/source.(*Kind).Start.func1.1
        /home/runner/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/source/kind.go:68
k8s.io/apimachinery/pkg/util/wait.loopConditionUntilContext.func1
        /home/runner/go/pkg/mod/k8s.io/[email protected]/pkg/util/wait/loop.go:49
k8s.io/apimachinery/pkg/util/wait.loopConditionUntilContext
        /home/runner/go/pkg/mod/k8s.io/[email protected]/pkg/util/wait/loop.go:50
k8s.io/apimachinery/pkg/util/wait.PollUntilContextCancel
        /home/runner/go/pkg/mod/k8s.io/[email protected]/pkg/util/wait/poll.go:33
sigs.k8s.io/controller-runtime/pkg/internal/source.(*Kind).Start.func1
        /home/runner/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/source/kind.go:56
2024-09-01T11:11:11.689Z        ERROR   controller-runtime.source.EventHandler  failed to get informer from cache       {"error": "Timeout: failed waiting for *v1.Pod Informer to sync"}
sigs.k8s.io/controller-runtime/pkg/internal/source.(*Kind).Start.func1.1
        /home/runner/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/source/kind.go:68
k8s.io/apimachinery/pkg/util/wait.loopConditionUntilContext.func1
        /home/runner/go/pkg/mod/k8s.io/[email protected]/pkg/util/wait/loop.go:49
k8s.io/apimachinery/pkg/util/wait.loopConditionUntilContext
        /home/runner/go/pkg/mod/k8s.io/[email protected]/pkg/util/wait/loop.go:50
k8s.io/apimachinery/pkg/util/wait.PollUntilContextCancel
        /home/runner/go/pkg/mod/k8s.io/[email protected]/pkg/util/wait/poll.go:33
sigs.k8s.io/controller-runtime/pkg/internal/source.(*Kind).Start.func1
        /home/runner/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/source/kind.go:56
2024-09-01T11:11:11.689Z        ERROR   controller-runtime.source.EventHandler  failed to get informer from cache       {"error": "Timeout: failed waiting for *v1beta1.ReferenceGrant Informer to sync"}
sigs.k8s.io/controller-runtime/pkg/internal/source.(*Kind).Start.func1.1
        /home/runner/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/source/kind.go:68
k8s.io/apimachinery/pkg/util/wait.loopConditionUntilContext.func1
        /home/runner/go/pkg/mod/k8s.io/[email protected]/pkg/util/wait/loop.go:49
k8s.io/apimachinery/pkg/util/wait.loopConditionUntilContext
        /home/runner/go/pkg/mod/k8s.io/[email protected]/pkg/util/wait/loop.go:50
k8s.io/apimachinery/pkg/util/wait.PollUntilContextCancel
        /home/runner/go/pkg/mod/k8s.io/[email protected]/pkg/util/wait/poll.go:33
sigs.k8s.io/controller-runtime/pkg/internal/source.(*Kind).Start.func1
        /home/runner/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/source/kind.go:56
2024-09-01T11:11:11.689Z        ERROR   controller-runtime.source.EventHandler  failed to get informer from cache       {"error": "Timeout: failed waiting for *v1alpha1.ProxyDefaults Informer to sync"}
sigs.k8s.io/controller-runtime/pkg/internal/source.(*Kind).Start.func1.1
        /home/runner/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/source/kind.go:68
        /home/runner/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/source/kind.go:56
2024-09-01T11:11:11.689Z        ERROR   controller-runtime.source.EventHandler  failed to get informer from cache       {"error": "Timeout: failed waiting for *v1alpha1.ServiceResolver Informer to sync"}
sigs.k8s.io/controller-runtime/pkg/internal/source.(*Kind).Start.func1.1
        /home/runner/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/source/kind.go:68
k8s.io/apimachinery/pkg/util/wait.loopConditionUntilContext.func1
        /home/runner/go/pkg/mod/k8s.io/[email protected]/pkg/util/wait/loop.go:49
k8s.io/apimachinery/pkg/util/wait.loopConditionUntilContext
        /home/runner/go/pkg/mod/k8s.io/[email protected]/pkg/util/wait/loop.go:50
k8s.io/apimachinery/pkg/util/wait.PollUntilContextCancel
        /home/runner/go/pkg/mod/k8s.io/[email protected]/pkg/util/wait/poll.go:33
sigs.k8s.io/controller-runtime/pkg/internal/source.(*Kind).Start.func1
        /home/runner/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/source/kind.go:56
2024-09-01T11:11:11.689Z        ERROR   controller-runtime.source.EventHandler  failed to get informer from cache       {"error": "Timeout: failed waiting for *v1alpha1.ExportedServices Informer to sync"}
sigs.k8s.io/controller-runtime/pkg/internal/source.(*Kind).Start.func1.1
        /home/runner/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/source/kind.go:68
k8s.io/apimachinery/pkg/util/wait.loopConditionUntilContext.func1
        /home/runner/go/pkg/mod/k8s.io/[email protected]/pkg/util/wait/loop.go:49
k8s.io/apimachinery/pkg/util/wait.loopConditionUntilContext
        /home/runner/go/pkg/mod/k8s.io/[email protected]/pkg/util/wait/loop.go:50
k8s.io/apimachinery/pkg/util/wait.PollUntilContextCancel
        /home/runner/go/pkg/mod/k8s.io/[email protected]/pkg/util/wait/poll.go:33
sigs.k8s.io/controller-runtime/pkg/internal/source.(*Kind).Start.func1
        /home/runner/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/source/kind.go:56
2024-09-01T11:11:11.689Z        ERROR   controller-runtime.source.EventHandler  failed to get informer from cache       {"error": "Timeout: failed waiting for *v1alpha1.ServiceSplitter Informer to sync"}
sigs.k8s.io/controller-runtime/pkg/internal/source.(*Kind).Start.func1.1
        /home/runner/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/source/kind.go:68
k8s.io/apimachinery/pkg/util/wait.loopConditionUntilContext.func1
        /home/runner/go/pkg/mod/k8s.io/[email protected]/pkg/util/wait/loop.go:49
k8s.io/apimachinery/pkg/util/wait.loopConditionUntilContext
        /home/runner/go/pkg/mod/k8s.io/[email protected]/pkg/util/wait/loop.go:50
k8s.io/apimachinery/pkg/util/wait.PollUntilContextCancel
        /home/runner/go/pkg/mod/k8s.io/[email protected]/pkg/util/wait/poll.go:33
sigs.k8s.io/controller-runtime/pkg/internal/source.(*Kind).Start.func1
        /home/runner/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/source/kind.go:56
2024-09-01T11:11:11.690Z        ERROR   controller-runtime.source.EventHandler  failed to get informer from cache       {"error": "Timeout: failed waiting for *v1alpha1.ServiceRouter Informer to sync"}
sigs.k8s.io/controller-runtime/pkg/internal/source.(*Kind).Start.func1.1
        /home/runner/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/source/kind.go:68
k8s.io/apimachinery/pkg/util/wait.loopConditionUntilContext.func1
        /home/runner/go/pkg/mod/k8s.io/[email protected]/pkg/util/wait/loop.go:49
k8s.io/apimachinery/pkg/util/wait.loopConditionUntilContext
        /home/runner/go/pkg/mod/k8s.io/[email protected]/pkg/util/wait/loop.go:50
k8s.io/apimachinery/pkg/util/wait.PollUntilContextCancel
        /home/runner/go/pkg/mod/k8s.io/[email protected]/pkg/util/wait/poll.go:33
sigs.k8s.io/controller-runtime/pkg/internal/source.(*Kind).Start.func1
        /home/runner/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/source/kind.go:56
2024-09-01T11:11:11.690Z        ERROR   controller-runtime.source.EventHandler  failed to get informer from cache       {"error": "Timeout: failed waiting for *v1alpha1.IngressGateway Informer to sync"}
sigs.k8s.io/controller-runtime/pkg/internal/source.(*Kind).Start.func1.1
        /home/runner/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/source/kind.go:68
k8s.io/apimachinery/pkg/util/wait.loopConditionUntilContext.func1
        /home/runner/go/pkg/mod/k8s.io/[email protected]/pkg/util/wait/loop.go:49
k8s.io/apimachinery/pkg/util/wait.loopConditionUntilContext
        /home/runner/go/pkg/mod/k8s.io/[email protected]/pkg/util/wait/loop.go:50
k8s.io/apimachinery/pkg/util/wait.PollUntilContextCancel
        /home/runner/go/pkg/mod/k8s.io/[email protected]/pkg/util/wait/poll.go:33
sigs.k8s.io/controller-runtime/pkg/internal/source.(*Kind).Start.func1
        /home/runner/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/source/kind.go:56
2024-09-01T11:11:11.690Z        ERROR   controller-runtime.source.EventHandler  failed to get informer from cache       {"error": "Timeout: failed waiting for *v1alpha1.ServiceIntentions Informer to sync"}
sigs.k8s.io/controller-runtime/pkg/internal/source.(*Kind).Start.func1.1
        /home/runner/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/source/kind.go:68
k8s.io/apimachinery/pkg/util/wait.loopConditionUntilContext.func1
        /home/runner/go/pkg/mod/k8s.io/[email protected]/pkg/util/wait/loop.go:49
k8s.io/apimachinery/pkg/util/wait.loopConditionUntilContext
        /home/runner/go/pkg/mod/k8s.io/[email protected]/pkg/util/wait/loop.go:50
k8s.io/apimachinery/pkg/util/wait.PollUntilContextCancel
        /home/runner/go/pkg/mod/k8s.io/[email protected]/pkg/util/wait/poll.go:33
sigs.k8s.io/controller-runtime/pkg/internal/source.(*Kind).Start.func1
        /home/runner/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/source/kind.go:56
2024-09-01T11:11:11.690Z        ERROR   controller-runtime.source.EventHandler  failed to get informer from cache       {"error": "Timeout: failed waiting for *v1alpha1.SamenessGroup Informer to sync"}
sigs.k8s.io/controller-runtime/pkg/internal/source.(*Kind).Start.func1.1
        /home/runner/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/source/kind.go:68
k8s.io/apimachinery/pkg/util/wait.loopConditionUntilContext.func1
        /home/runner/go/pkg/mod/k8s.io/[email protected]/pkg/util/wait/loop.go:49
        /home/runner/go/pkg/mod/k8s.io/[email protected]/pkg/util/wait/poll.go:33
sigs.k8s.io/controller-runtime/pkg/internal/source.(*Kind).Start.func1
        /home/runner/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/source/kind.go:56
2024-09-01T11:11:11.690Z        ERROR   controller-runtime.source.EventHandler  failed to get informer from cache       {"error": "Timeout: failed waiting for *v1alpha1.TerminatingGateway Informer to sync"}
sigs.k8s.io/controller-runtime/pkg/internal/source.(*Kind).Start.func1.1
        /home/runner/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/source/kind.go:68
k8s.io/apimachinery/pkg/util/wait.loopConditionUntilContext.func1
        /home/runner/go/pkg/mod/k8s.io/[email protected]/pkg/util/wait/loop.go:49
k8s.io/apimachinery/pkg/util/wait.loopConditionUntilContext
        /home/runner/go/pkg/mod/k8s.io/[email protected]/pkg/util/wait/loop.go:50
k8s.io/apimachinery/pkg/util/wait.PollUntilContextCancel
        /home/runner/go/pkg/mod/k8s.io/[email protected]/pkg/util/wait/poll.go:33
sigs.k8s.io/controller-runtime/pkg/internal/source.(*Kind).Start.func1
        /home/runner/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/source/kind.go:56
2024-09-01T11:11:11.690Z        ERROR   controller-runtime.source.EventHandler  failed to get informer from cache       {"error": "Timeout: failed waiting for *v1alpha1.ControlPlaneRequestLimit Informer to sync"}
sigs.k8s.io/controller-runtime/pkg/internal/source.(*Kind).Start.func1.1
        /home/runner/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/source/kind.go:68
        /home/runner/go/pkg/mod/k8s.io/[email protected]/pkg/util/wait/poll.go:33
sigs.k8s.io/controller-runtime/pkg/internal/source.(*Kind).Start.func1
        /home/runner/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/source/kind.go:56
2024-09-01T11:11:11.690Z        ERROR   controller-runtime.source.EventHandler  failed to get informer from cache       {"error": "Timeout: failed waiting for *v1alpha1.JWTProvider Informer to sync"}
sigs.k8s.io/controller-runtime/pkg/internal/source.(*Kind).Start.func1.1
        /home/runner/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/source/kind.go:68
k8s.io/apimachinery/pkg/util/wait.loopConditionUntilContext.func1
        /home/runner/go/pkg/mod/k8s.io/[email protected]/pkg/util/wait/loop.go:49
k8s.io/apimachinery/pkg/util/wait.loopConditionUntilContext
        /home/runner/go/pkg/mod/k8s.io/[email protected]/pkg/util/wait/loop.go:50
k8s.io/apimachinery/pkg/util/wait.PollUntilContextCancel
        /home/runner/go/pkg/mod/k8s.io/[email protected]/pkg/util/wait/poll.go:33
sigs.k8s.io/controller-runtime/pkg/internal/source.(*Kind).Start.func1
        /home/runner/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/source/kind.go:56
2024-09-01T11:11:11.690Z        ERROR   controller-runtime.source.EventHandler  failed to get informer from cache       {"error": "Timeout: failed waiting for *v1alpha1.TerminatingGateway Informer to sync"}
sigs.k8s.io/controller-runtime/pkg/internal/source.(*Kind).Start.func1.1
        /home/runner/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/source/kind.go:68
k8s.io/apimachinery/pkg/util/wait.loopConditionUntilContext.func1
        /home/runner/go/pkg/mod/k8s.io/[email protected]/pkg/util/wait/loop.go:49
k8s.io/apimachinery/pkg/util/wait.loopConditionUntilContext
        /home/runner/go/pkg/mod/k8s.io/[email protected]/pkg/util/wait/loop.go:50

2024-09-01T11:11:11.690Z        INFO    controller-runtime.webhook      Shutting down webhook server with timeout of 1 minute
2024-09-01T11:11:11.690Z        INFO    Stopping and waiting for HTTP servers
2024-09-01T11:11:11.690Z        INFO    shutting down server    {"kind": "health probe", "addr": "[::]:9445"}
2024-09-01T11:11:11.690Z        INFO    controller-runtime.metrics      Shutting down metrics server with timeout of 1 minute
2024-09-01T11:11:11.690Z        INFO    Wait completed, proceeding to shutdown the manager
2024-09-01T11:11:11.690Z [INFO]  consul-server-connection-manager.consul-server-connection-manager: stopping

以下是我在服务器中的配置文件

cat /etc/consul.d/consul.hcl | grep -v "#"

data_dir = "/opt/consul"
client_addr = "0.0.0.0"

ui_config{
  enabled = true
}

server = true 
advertise_addr = "192.168.60.10"
bootstrap_expect=1
retry_join = ["192.168.60.10"]

ports {
 grpc = 8502
} 

这是我的自定义values.yaml 文件,我用来在 K8S 上安装 Consul

global:
  enabled: false
  tls:
    enabled: false
externalServers:
  enabled: true
  hosts: ["192.168.60.10"]
server:
  enabled: false

我正在尝试使用Consul数据平面,而不按照Consul使用客户端

随着Consul Dataplane的引入,Consul安装在 通过删除 Consul 客户端代理来简化 Kubernetes。这 需要安装 Helm 和其他 consul-k8s 组件 安装在 Kubernetes 上以直接与各种不同的 Consul 服务器通信 端口。在开始安装之前,请确保 Consul 服务器配置为启用 gRPC 端口 8502/tcp 使用 ports.grpc = 8502 配置选项。

我不确定我是否在这里遗漏了一些东西。我真诚地感谢任何帮助解决这个问题的人。

谢谢!

kubernetes consul
1个回答
0
投票

您也应该在 helm-values.yaml 中添加

httpsPort: 8500

global:
  enabled: false
  tls:
    enabled: false
externalServers:
  enabled: true
  hosts: ["192.168.60.10"]
  httpsPort: 8500
server:
  enabled: false
© www.soinside.com 2019 - 2024. All rights reserved.