Giter VIP home page Giter VIP logo

Comments (1)

federicaciuffo avatar federicaciuffo commented on August 23, 2024

I experience this problem when I have to export/import an svc cross-cluster (for in-cluster it's working fine for me).

I'm trying to configure like below but still it doesn't work (it tries to reconcile again and again when I add the exported service - svc2 - to the route.
The k8s services I'm using are all exposed in port 80 and I'm able to create the httproute like the below in default namespace in the same cluster.

Service EXPORT

apiVersion: multicluster.x-k8s.io/v1alpha1
kind: ServiceExport
metadata:
  name: svc2_name
  namespace: ns_name
  annotations:
          multicluster.x-k8s.io/federation: "amazon-vpc-lattice"

Service IMPORT

apiVersion: multicluster.x-k8s.io/v1alpha1
kind: ServiceImport
metadata:
  name: svc2_name
  namespace: ns_name
  annotations:
          multicluster.x-k8s.io/aws-vpc: "your-vpc-id"    
          multicluster.x-k8s.io/aws-eks-cluster-name: "mercury-eks-test-1"
spec:
  type: ClusterSetIP
  ports:
  - port: 80
    protocol: TCP

Http ROUTE

apiVersion: gateway.networking.k8s.io/v1alpha2
kind: HTTPRoute
metadata:
  name: colorroute
  namespace: ns_name
spec:
  parentRefs:
  - name: gw_name
    sectionName: http 
  rules:
  - backendRefs:  
    - name: svc1_name
      namespace: ns_name
      kind: Service
      port: 80
      weight: 50
    - name: svc2_name
      namespace: ns_name
      kind: ServiceImport
      port: 80
      weight: 50

Actually in my tests the target group is not created (see below, serviceArns filed for svc2:

aws vpc-lattice list-target-groups --endpoint-url=https://vpc-lattice.us-west-2.amazonaws.com/
{
            "arn": "arn:aws:vpc-lattice:us-west-2:621558967091:targetgroup/tg-0fef994f32d4961d8",
            "createdAt": "2023-01-04T14:33:39.709000+00:00",
            "id": "tg-0fef994f32d4961d8",
            "lastUpdatedAt": "2023-01-04T14:33:39.709000+00:00",
            "name": "svc2_name-ns_name",
            "serviceArns": [],
            "status": "ACTIVE",
            "type": "IP"
        }
    ]
 {
            "arn": "arn:aws:vpc-lattice:us-west-2:621558967091:targetgroup/tg-08e4bcbeda8b51e08",
            "createdAt": "2022-11-29T14:35:15.548000+00:00",
            "id": "tg-08e4bcbeda8b51e08",
            "lastUpdatedAt": "2022-11-29T14:35:15.548000+00:00",
            "name": "k8s-inventory-ver2-default",
            "serviceArns": [
                "arn:aws:vpc-lattice:us-west-2:621558967091:service/svc-0f89d8ff5e98400d0"
            ],
            "status": "ACTIVE",
            "type": "IP"
        },

I don't have the logs anymore but also in the logs of the controller it was the same (the error was that the target group of the exported service was empty).

I tried with different names for the services and routes but I wasn't able to export.

from aws-application-networking-k8s.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.