#Kubernetes plugin - No Kubernetes resources

18 messages · Page 1 of 1 (latest)

cyan schooner
#

Hi All,
If someone can help me, that will be appreciated where I am stuck a bit..
I installed and configured Kubernetes plugin but somehow I can not able to see any resource where it says No Kubernetes resources No resources on any known clusters for aks-gha-westeurope-dev

I can confirm that Deployment manifest in Kubernetes also has label backstage.io/kubernetes-id=sp-gha-dev.
What I am doing wrong ?

Here is my app-config.yaml

kubernetes:
  serviceLocatorMethod:
    type: 'multiTenant'
  clusterLocatorMethods:
    - type: 'catalog'

Here is my catalog-info.yaml

apiVersion: backstage.io/v1alpha1
kind: Resource
metadata:
  name: aks-gha-westeurope-dev
  title: aks-gha-westeurope-dev
  description: GitHub Actions self-hosted runners development environment in Kubernetes.
  annotations:
    kubernetes.io/api-server-certificate-authority: .....
    kubernetes.io/api-server: https://xxxxxxx.io
spec:
  type: cluster
  system: github-actions
  owner: rg_az_cc_pp-integration_team_employees
  lifecycle: experimental

---
apiVersion: backstage.io/v1alpha1
kind: Component
metadata:
  name: sp-gha-prod
  title: GitHub Actions
  description: GitHub Actions self-hosted runners
  annotations:
    backstage.io/kubernetes-id: sp-gha-dev ---> here
spec:
  type: service
  system: github-actions
  owner: rg_az_cc_pp-integration_team_employees
  lifecycle: production
#

Seems clusterDetails array also empty

k logs -f sp-sde-portal-dev-5954c88d6-5swnz -n sp-sde-portal-dev | grep sp-gha-dev                                                                                                                                1|1 ✘  sp-sde-portal-dev-aks ⎈  19:52:32Defaulted container "sp-sde-portal" out of: sp-sde-portal, sp-sde-portal-setup (init)
{"level":"info","message":"entity.metadata.name=sp-gha-dev clusterDetails=[]","plugin":"kubernetes","service":"backstage","type":"plugin"}
{"level":"info","message":"entity.metadata.name=sp-gha-dev clusterDetails=[]","plugin":"kubernetes","service":"backstage","type":"plugin"}
{"level":"info","message":"entity.metadata.name=sp-gha-dev clusterDetails=[]","plugin":"kubernetes","service":"backstage","type":"plugin"}
{"level":"info","message":"entity.metadata.name=sp-gha-dev clusterDetails=[]","plugin":"kubernetes","service":"backstage","type":"plugin"}
{"level":"info","message":"entity.metadata.name=sp-gha-dev clusterDetails=[]","plugin":"kubernetes","service":"backstage","type":"plugin"}
atomic field
#

maybe a naming mismatch?

apiVersion: backstage.io/v1alpha1
kind: Component
metadata:
name: sp-gha-prod
title: GitHub Actions
description: GitHub Actions self-hosted runners
annotations:

  • backstage.io/kubernetes-id: aks-gha-westeurope-dev
    spec:
    type: service
    system: github-actions
    owner: rg_az_cc_pp-integration_team_employees
    lifecycle: production
#

I think these resource names should match

cyan schooner
#

thanks a lot @atomic field

atomic field
#

Most welcome

zealous chasm
#

Hello @cyan schooner, can you please help how you configured kubernetes plugin... I have been troubleshooting it for 2 days but nothing is working.

I have deployed backstage on VM.

#

Error SS:

atomic field
#

@zealous chasm have you run yarn add @backstage/plugin-kubernetes-backend

zealous chasm
#

yes I did run that command

atomic field
#

Can you run yarn list @backstage/plugin-kubernetes-backend and tell me what you see?

zealous chasm
#

I am getting this output @atomic field

onyx osprey
#

Hey @atomic field These are the errors we are getting:

zealous chasm
#

Hi @atomic field can you please help on above error which shivangi has posted. Its little urgetn your help will be very helpful

atomic field
#

I’m away from keyboard until later this morning. I will give these pics a look over and get back to you today just later this morning/eRly afternoon.

atomic field
#

Ok y'all. Here is what I can see from the above pics and details.
The first pic tells me that something is amise with the k8s plugin but the second pic shows its there. That makes me want to know if the version and linked correctly.
The third pic tells me sh=omething is up with importing the kubernetes mod..
Also in the third image I see some funkyness with type decs..

That being said, I took some of my other bash scripts I use for debugging and did a mix&match to come up with https://gist.github.com/markjacksonfishing/a9ffd37693aef85cd2c4378b05ac70a8

I'm slightly confused by the thread because it is part of another person asking for help with a slightly different topic, as well as there are two of you. I think you both are working as a team so tht is how I approached this.
In any event, I hope this helps and feel free to take the code and tweak it to satisfy anything I either missed or don't have all the contextual awareness for.
Here in the states it's a holiday today so I will be spotty the remainder of today but will check back here and there.
Good luck and I hope this at least moves you in the right direction.

zealous chasm
#

Thank you so much for all the help. We will try from our end and let you know.