I've set up OpenZiti in an EKS Cluster and successfully created an edge router. I connected an edge device (an EC2 instance) using ziti-edge-tunnel, and everything is functioning as expected.
Here’s a summary of the steps I followed:
YAML Files Used
I used the following YAML files to install the Controller and Router on the EKS Cluster via Helm:
Controller Values:
clientApi:
advertisedHost: ziti-controller.example-domain.com
advertisedPort: 443
service:
type: LoadBalancer
ingress:
enabled: true
ingressClassName: nginx
annotations:
kubernetes.io/ingress.allow-http: "false"
nginx.ingress.kubernetes.io/ssl-passthrough: "true"
ctrlPlane:
advertisedHost: ziti-controller-ctrl.example-domain.com
advertisedPort: 443
service:
enabled: true
type: LoadBalancer
ingress:
enabled: true
ingressClassName: nginx
annotations:
kubernetes.io/ingress.allow-http: "false"
nginx.ingress.kubernetes.io/ssl-passthrough: "true"
persistence:
enabled: true
accessMode: ReadWriteOnce
size: 10Gi
storageClass: ebs-sc
cert-manager:
enabled: true
enableCertificateOwnerRef: true
installCRDs: false
trust-manager:
enabled: true
app:
trust:
namespace: ziti-controller
crds:
enabled: false
ingress-nginx:
enabled: true
controller:
extraArgs:
enable-ssl-passthrough: "true"
Router Values:
ctrl:
endpoint: ziti-controller-ctrl.example-domain.com:443
advertisedHost: ziti-router.example-domain.com
edge:
advertisedHost: ziti-router.example-domain.com
advertisedPort: 443
service:
type: LoadBalancer
ingress:
enabled: true
ingressClassName: nginx
annotations:
kubernetes.io/ingress.allow-http: "false"
nginx.ingress.kubernetes.io/ssl-passthrough: "true"
linkListeners:
transport:
advertisedHost: ziti-router-transport.example-domain.com
advertisedPort: 443
service:
enabled: true
type: LoadBalancer
ingress:
enabled: true
ingressClassName: nginx
annotations:
kubernetes.io/ingress.allow-http: "false"
nginx.ingress.kubernetes.io/ssl-passthrough: "true"
persistence:
enabled: true
accessMode: ReadWriteOnce
size: 1Gi
storageClass: ebs-sc
Note: Domain names are hidden due to NDA. The domain example-domain.com
is used as a placeholder.
Setting Up Multiple Routers
I need to set up multiple routers, generate three tokens, and then install the router on EKS three times. Here’s what I’ve done so far:
1. Create Three Enrollment Tokens for Routers in Three Zones
ziti edge create edge-router router-Zone-A \
--role-attributes '#router-zone-A' \
--tunneler-enabled \
--jwt-output-file router-zone-A.jwt
ziti edge create edge-router router-Zone-B \
--role-attributes '#router-zone-B' \
--tunneler-enabled \
--jwt-output-file router-zone-B.jwt
ziti edge create edge-router router-Zone-C \
--role-attributes '#router-zone-C' \
--tunneler-enabled \
--jwt-output-file router-zone-C.jwt
2. Install Ziti Routers on EKS
helm install \
--namespace ziti-router --create-namespace --generate-name \
openziti/ziti-router \
--set-file enrollmentJwt=router-zone-A.jwt \
--values router-values-router-zone-A.yml
helm install \
--namespace ziti-router --create-namespace --generate-name \
openziti/ziti-router \
--set-file enrollmentJwt=router-zone-B.jwt \
--values router-values-router-zone-B.yml
helm install \
--namespace ziti-router --create-namespace --generate-name \
openziti/ziti-router \
--set-file enrollmentJwt=router-zone-C.jwt \
--values router-values-router-zone-C.yml
Setting Up Identity Devices
I also need to set up multiple identity devices, ensuring they connect only to their respective router. I used the following commands:
ziti edge create identity device EC2-1-Zone-A --role-attributes "#identity-zone-A" -o EC2-1-Zone-A.json
ziti edge create identity device EC2-2-Zone-A --role-attributes "#identity-zone-A" -o EC2-2-Zone-A.json
ziti edge create identity device EC2-3-Zone-A --role-attributes "#identity-zone-A" -o EC2-3-Zone-A.json
ziti edge create identity device EC2-1-Zone-B --role-attributes "#identity-zone-B" -o EC2-1-Zone-B.json
ziti edge create identity device EC2-2-Zone-B --role-attributes "#identity-zone-B" -o EC2-2-Zone-B.json
ziti edge create identity device EC2-3-Zone-B --role-attributes "#identity-zone-B" -o EC2-3-Zone-B.json
ziti edge create identity device EC2-1-Zone-C --role-attributes "#identity-zone-C" -o EC2-1-Zone-C.json
ziti edge create identity device EC2-2-Zone-C --role-attributes "#identity-zone-C" -o EC2-2-Zone-C.json
ziti edge create identity device EC2-3-Zone-C --role-attributes "#identity-zone-C" -o EC2-3-Zone-C.json
Router Policy Binding
I understand that I need to create a Router Policy to bind these identities to the appropriate routers. So that while connecting the tunnel they could connect to those routers only. I’ve used the following commands:
ziti edge create edge-router-policy zone-a-router-policy \
--edge-router-roles "#router-zone-A" \
--identity-roles "#identity-zone-A" \
--semantic "AnyOf"
ziti edge create edge-router-policy zone-b-router-policy \
--edge-router-roles "#router-zone-B" \
--identity-roles "#identity-zone-B" \
--semantic "AnyOf"
ziti edge create edge-router-policy zone-c-router-policy \
--edge-router-roles "#router-zone-C" \
--identity-roles "#identity-zone-B" \
--semantic "AnyOf"
Questions
- Do I need to use the same
router-values.yml
file everywhere, or should I modify any values for each router? - Will the identities with role attributes related to Zone-A connect only to the routers in Zone-A, and similarly for the other zones?
I’m new to this and would greatly appreciate any guidance or confirmation that I’m on the right track.
Thanks in advance!