Hello, I’m trying to setup consul federation with ACL enabled on two kubernetes clusters managed by Rancher.
I’m getting following error in consul-connect-injector pod and in consul-mesh-gateway init container:
consul-server-connection-manager: connection error: error="rpc error: code = Unauthenticated desc = Post \"https://kubernetes.default.svc/apis/authentication.k8s.io/v1/tokenreviews\": x509: certificate signed by unknown authority"
Consul was installed by helm with following values:
DC1
connectInject:
enabled: true
global:
enabled: true
name: consul
domain: consul
acls:
createReplicationToken: true
manageSystemACLs: true
datacenter: dc1
federation:
createFederationSecret: true
enabled: true
gossipEncryption:
autoGenerate: true
tls:
enabled: true
meshGateway:
enabled: true
DC2
connectInject:
enabled: true
global:
enabled: true
name: consul
domain: consul
acls:
createReplicationToken: false
manageSystemACLs: true
replicationToken:
secretKey: replicationToken
secretName: consul-federation
datacenter: dc2
federation:
createFederationSecret: false
enabled: true
k8sAuthMethodHost: https://kubernetes.default.svc
primaryDatacenter: dc1
gossipEncryption:
autoGenerate: false
secretKey: gossipEncryptionKey
secretName: consul-federation
tls:
caCert:
secretKey: caCert
secretName: consul-federation
caKey:
secretKey: caKey
secretName: consul-federation
enabled: true
meshGateway:
enabled: true
server:
extraVolumes:
- items:
- key: serverConfigJSON
path: config.json
load: true
name: consul-federation
type: secret
I have used official documentation and tutorials to setup this.
Can anyone help to solve this issue?