broad-kilobyte-43768
09/18/2021, 8:55 PMpulumi up
locally it works, but it fails with this error whenever the provider is used on my GitHub action.
THING creating error: configured Kubernetes cluster is unreachable: unable to load Kubernetes client configuration from kubeconfig file: invalid configuration: no configuration has been provided
This is my infra code on a repo called "api"
const sharedInfrastructure = new pulumi.StackReference(sharedInfraStackName)
const provider = new k8s.Provider('k8s', {
kubeconfig: sharedInfrastructure.getOutput('kubeConfig'),
})
// use provider...
Action
name: Infrastructure push
on:
push:
branches:
- main
paths:
- 'infrastructure/**'
jobs:
apply:
name: Apply infrastructure
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 14.x
- run: cd infrastructure && npm install
- uses: pulumi/actions@v3
with:
command: up
stack-name: dev
work-dir: ./infrastructure
env:
PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }}
DIGITALOCEAN_TOKEN: ${{ secrets.DIGITALOCEAN_TOKEN }}
Here's how I create my kubernetes cluster in another shared infra repo:
import * as digitalocean from '@pulumi/digitalocean'
import * as k8s from '@pulumi/kubernetes'
const cluster = new digitalocean.KubernetesCluster('cluster', {
region: digitalocean.Region.LON1,
version: 'latest',
nodePool: {
name: 'default',
size: digitalocean.DropletSlug.DropletS2VCPU2GB,
nodeCount: 1,
},
})
export const kubeConfig = cluster.kubeConfigs[0].rawConfig
Does anyone have any tips to solve this?billowy-army-68599
09/19/2021, 11:24 PMKUBECONFIG
generated use any specific credentials? did you get this working?broad-kilobyte-43768
09/20/2021, 12:24 AM