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

MeshService status Unavailable but is reachable #12042

Open
schogges opened this issue Nov 14, 2024 · 1 comment
Open

MeshService status Unavailable but is reachable #12042

schogges opened this issue Nov 14, 2024 · 1 comment
Labels
kind/bug A bug triage/needs-reproducing Someone else should try to reproduce this

Comments

@schogges
Copy link
Contributor

schogges commented Nov 14, 2024

What happened?

After I deployed my services as k8s Service and configured the Mesh with meshServices.mode: "Exclusive", my services became MeshService and went into state Unavailable (check for spec.state: Unavailable in examplary MeshService YAML Dump below). When sending requests I get the expected responses, so the services are actually available.

Deployment Configs
apiVersion: kuma.io/v1alpha1
kind: Mesh
metadata:
  name: default
spec:
  mtls:
    enabledBackend: ca-1
    backends:
    - name: ca-1
      type: builtin
  meshServices:
    mode: Exclusive
---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: finance-api
  namespace: app
  labels:
    app: finance-api
spec:
  replicas: 1
  selector:
    matchLabels:
      app: finance-api
  template:
    metadata:
      labels:
        app: finance-api
    spec:
      containers:
      - name: finance-api
        image: finance-api:0.0.1
        imagePullPolicy: IfNotPresent
        ports:
        - containerPort: 8002
        readinessProbe:
          httpGet:
            path: /health
            scheme: HTTP
            port: 8002
          initialDelaySeconds: 5
          timeoutSeconds: 5
---
apiVersion: v1
kind: Service
metadata:
  name: finance-api
  namespace: app
  labels:
    app: finance-api
spec:
  selector:
    app: finance-api
  ports:
  - protocol: TCP
    port: 80
    appProtocol: http
    targetPort: 8002
MeshService YAML Dump
apiVersion: kuma.io/v1alpha1
kind: MeshService
metadata:
  annotations:
    kuma.io/display-name: finance-api
  creationTimestamp: "2024-11-11T15:48:33Z"
  generation: 4
  labels:
    app: finance-api
    k8s.kuma.io/is-headless-service: "false"
    k8s.kuma.io/namespace: app
    k8s.kuma.io/service-name: finance-api
    kuma.io/env: kubernetes
    kuma.io/managed-by: k8s-controller
    kuma.io/mesh: default
    kuma.io/origin: zone
    kuma.io/zone: west
  name: finance-api
  namespace: app
  ownerReferences:
  - apiVersion: v1
    kind: Service
    name: finance-api
    uid: 8e8e6442-ae6e-449b-a761-818e508a6e89
  resourceVersion: "368987"
  uid: 2edc7175-e34c-4722-b931-4102baaedff8
spec:
  identities:
  - type: ServiceTag
    value: finance-api_app_svc_80
  ports:
  - appProtocol: http
    name: "80"
    port: 80
    targetPort: 8002
  selector:
    dataplaneTags:
      app: finance-api
      k8s.kuma.io/namespace: app
  state: Unavailable
status:
  addresses:
  - hostname: finance-api.moritz-services.svc.mesh.local
    hostnameGeneratorRef:
      coreName: my-mesh-service-vw6c7xdbd9cx26vx.kuma-system
    origin: HostnameGenerator
  dataplaneProxies:
    connected: 1
    total: 1
  hostnameGenerators:
  - conditions:
    - message: ""
      reason: Generated
      status: "True"
      type: Generated
    hostnameGeneratorRef:
      coreName: my-mesh-service-vw6c7xdbd9cx26vx.kuma-system
  tls:
    status: Ready
  vips:
  - ip: 10.96.215.190
@schogges schogges added kind/bug A bug triage/pending This issue will be looked at on the next triage meeting labels Nov 14, 2024
@lobkovilya lobkovilya added triage/needs-reproducing Someone else should try to reproduce this and removed triage/pending This issue will be looked at on the next triage meeting labels Nov 18, 2024
@lobkovilya
Copy link
Contributor

Triage: also would be nice to add "state" explanation to the kuma-website

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug A bug triage/needs-reproducing Someone else should try to reproduce this
Projects
None yet
Development

No branches or pull requests

2 participants