Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[v1] flow-collector improvements for external vm clients #1859

Open
Karen-Schoener opened this issue Dec 19, 2024 · 3 comments
Open

[v1] flow-collector improvements for external vm clients #1859

Karen-Schoener opened this issue Dec 19, 2024 · 3 comments
Assignees

Comments

@Karen-Schoener
Copy link
Collaborator

Investigate v1 flow-collector improvements for external vm clients.

Goal is to allow metrics to be tracked per external vm client ip.

@Karen-Schoener Karen-Schoener self-assigned this Dec 19, 2024
@Karen-Schoener
Copy link
Collaborator Author

Posted draft PR: #1857: [v1] flow-collector: add source ip to site-clients process name

@Karen-Schoener
Copy link
Collaborator Author

Attaching skupper console screen shots: Process, Topology / Components, Topology / Processes.

skupper-console-processes

skuper-console-topology-components
skupper-console-topology-processes

@Karen-Schoener
Copy link
Collaborator Author

Here are steps to test with external VM clients.

  1. Start minikube with metallb
minikube start
minikube addons enable metallb
kubectl apply -f metallb-config.yaml
$ cat metallb-config.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  namespace: metallb-system
  name: config
data:
  config: |
    address-pools:
    - name: default
      protocol: layer2
      addresses:
      - 192.168.49.240-192.168.49.250
  1. Create skupper sites: east, west. Link skupper sites.

  2. Create service for the server VM.

    Note: My server VM IP = 192.168.56.119.

kubectl -n east apply -f service-backend-ext-config.yaml
kubectl -n east apply -f endpoints-backend-ext-config.yaml
$ cat service-backend-ext-config.yaml
apiVersion: v1
kind: Service
metadata:
  name: backend-ext
spec:
  ports:
    - protocol: TCP
      port: 8080
$ cat endpoints-backend-ext-config.yaml
apiVersion: v1
kind: Endpoints
metadata:
  name: backend-ext
subsets:
  - addresses:
      - ip: 192.168.56.119
    ports:
      - port: 8080
  1. Expose VM service on the VAN.
    # Expose the service as 'backend' on the VAN.
    # NOTE: You cannot expose the service on the VAN with the same
    # name/address as the existing kube service
    # That causes skupper to mess with the backing Endpoints resource to point to the router,
    # instead of the external VM it was set up for

    kubectl -n east annotate service/backend-ext skupper.io/port="8080"
    kubectl -n east annotate service/backend-ext skupper.io/address="vm-backend"
    kubectl -n east annotate service/backend-ext skupper.io/target="backend-ext"
    kubectl -n east annotate service/backend-ext skupper.io/proxy="tcp"
  1. Create LoadBalancer service.

    Lookup service port in skupper-internal.
    Edit service-backend-lb.yaml to use service port

    kubectl -n west apply -f service-backend-lb.yaml
$ cat service-backend-lb.yaml
apiVersion: v1
kind: Service
metadata:
  name: backend-lb
spec:
  type: LoadBalancer
  externalTrafficPolicy: Local
  ports:
  - name: http
    port: 8080
    protocol: TCP
    targetPort: 1024
  selector:
    application: skupper-router
    skupper.io/component: router
  loadBalancerIP: 192.168.49.250
  1. Now, my client VM in west can issue requests to the loadBalancerIP.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant