@gus. I could make it working with dynamodb and the problem that I told you regarding the cluster_name was my fault. It occurred because I changed the teleport image default command to the bellow one:
command:
- "/bin/bash"
args:
- "-c"
- "teleport start -c /etc/teleport/teleport.yaml --diag-addr=0.0.0.0:3000 --roles=proxy,auth -d & PID=$! && sleep 5 && tctl create /etc/teleport/trusted_cluster.yaml && wait $PID"
I know that is better to use a sidecar container for it. This was only for testing proposes…
Now I finally have the correct cluster name and I’m facing the issue mentioned here: How to share kubernetes groups between trusted clusters. After login with tsh, if I try to execute kubectl on my k8s cluser, the main cluster auth is logging this:
INFO [RBAC] Access to create user in namespace default denied to roles Proxy,default-implicit-role: no allow rule matched. services/role.go:1826
The teleport cluster that is running within k8s cluster is trowing some debug messages that I don’t know if are important…
DEBU [PROXY:AGE] Seeking: {Cluster:eu-west-1 Type:proxy Addr:{Addr:teleport-main-cluster.eu-west-1.mydomain:3024 AddrNetwork:tcp Path:}}. cluster:test-eks reversetunnel/agentpool.go:180
DEBU [PROXY:AGE] Adding agent(id=57,state=connecting) -> eu-west-1:teleport-main-cluster.eu-west-1.mydomain:3024. cluster:test-eks reversetunnel/agentpool.go:312
DEBU [PROXY:AGE] Changing state connecting -> connecting. id:57 target:teleport-main-cluster.eu-west-1.mydomain:3024 reversetunnel/agent.go:204
DEBU [HTTP:PROX] No valid environment variables found. proxy/proxy.go:217
DEBU [HTTP:PROX] No proxy set in environment, returning direct dialer. proxy/proxy.go:137
INFO [PROXY:AGE] Connected to 10.100.3.105:3024 id:57 target:teleport-main-cluster.eu-west-1.mydomain:3024 reversetunnel/agent.go:420
DEBU [PROXY:AGE] Agent connected to proxy: [7758fc50-f750-44bf-90f0-5c6483c4a7b7.eu-west-1 test-teleport-proxy.eu-west-1 test-teleport-proxy auth.eu-west-1.mydomain remote.kube.proxy.teleport.cluster.local ssh.eu-west-1.mydomain k8s.eu-west-1.mydomain]. id:57 target:teleport-main-cluster.eu-west-1.mydomain:3024 reversetunnel/agent.go:431
DEBU [PROXY:AGE] Changing state connecting -> connected. id:57 target:teleport-main-cluster.eu-west-1.mydomain:3024 reversetunnel/agent.go:213
DEBU [PROXY:AGE] Proxy already held by other agent: [7758fc50-f750-44bf-90f0-5c6483c4a7b7.eu-west-1 test-teleport-proxy.eu-west-1 test-teleport-proxy auth.eu-west-1.mydomain remote.kube.proxy.teleport.cluster.local ssh.eu-west-1.mydomain k8s.eu-west-1.mydomain], releasing. id:57 target:teleport-main-cluster.eu-west-1.mydomain:3024 reversetunnel/agent.go:462
DEBU [PROXY:AGE] Changing state connected -> disconnected. id:57 target:teleport-main-cluster.eu-west-1.mydomain:3024 reversetunnel/agent.go:213