This message was deleted.
# kubernetes
s
This message was deleted.
b
which version of the Kubernetes provider are you using?
please update to at least 3.21.1
s
Just using the Pulumi docker image:
Copy code
docker run -it --entrypoint='' pulumi/pulumi:latest bash
root@7040b4486d76:/# kubectl --version
error: unknown flag: --version
See 'kubectl --help' for usage.
root@7040b4486d76:/# kubectl version
WARNING: This version information is deprecated and will be replaced with the output from kubectl version --short.  Use --output=yaml|json to get the full version.
Client Version: <http://version.Info|version.Info>{Major:"1", Minor:"25", GitVersion:"v1.25.3", GitCommit:"434bfd82814af038ad94d62ebe59b133fcb50506", GitTreeState:"clean", BuildDate:"2022-10-12T10:57:26Z", GoVersion:"go1.19.2", Compiler:"gc", Platform:"linux/amd64"}
Kustomize Version: v4.5.7
b
i need to know the provider version, it should be printed from
pulumi about
but in any case, you need to update it
s
this is before the cluster is deployed
the same stack both deploys the cluster and deploys the argocd helm chart
b
I’m trying to help, but without the Kubernetes provider version you’re using in your stack it’s difficult to do so
s
what I'm saying is that I'm not doing anything unique here, using the official Pulumi docker image, this is before k8s is even deployed. here's a stack config to replicate
Copy code
network:
  type: gcp:compute:Network

cluster:
  type: gcp:container:Cluster
  properties:
    ipAllocationPolicy: {}
    location: us-east4
    name: ${pulumi.stack}
    network: ${network.id}
    removeDefaultNodePool: true
    initialNodeCount: 2
cluster-nodepool:
  type: gcp:container:NodePool
  properties:
    cluster: ${cluster.id}
    autoscaling:
      minNodeCount: 1
      maxNodeCount: 20
    location: us-east4
    nodeLocations:
      - us-east4-c
  options:
    parent: ${cluster}

auth:
  type: command:local:Command
  properties:
    create: USE_GKE_GCLOUD_AUTH_PLUGIN=True gcloud container clusters get-credentials ${cluster.id} --region=us-east4 --project=${pulumi.stack} --verbosity=error >/dev/null 2>&1
  options:
    dependsOn:
      - ${cluster}
    parent: ${cluster}

provider:
  type: pulumi:providers:kubernetes
  properties:
    cluster: "gke_${pulumi.stack}_us-east4_${cluster.name}"
  options:
    dependsOn:
      - ${auth}
    parent: ${cluster}

argo-ns:
  type: kubernetes:core/v1:Namespace
  properties:
    metadata:
      name: argocd
  options:
    dependsOn:
      - ${provider}
    parent: ${cluster}

argo-deploy:
  type: kubernetes:<http://helm.sh/v3:Release|helm.sh/v3:Release>
  properties:
    chart: argo-cd
    version: 5.14.1
    name: argo-deploy
    namespace: argocd
    repositoryOpts:
      repo: <https://argoproj.github.io/argo-helm>
  options:
    providers:
      - ${provider}
    dependsOn:
      - ${argo-ns}
      - ${auth}
    parent: ${argo-ns}
this is a fresh project here
Copy code
$ docker run -it --entrypoint='' pulumi/pulumi:latest bash
root@e1a34e076f55:/# pulumi about
CLI
Version      3.48.0
Go Version   go1.19.2
Go Compiler  gc

Host
OS       debian
Version  11.5
Arch     x86_64
b
what I’m saying is that I’m not doing anything unique here
yes, that’s clear, however this was a bug in the Kubernetes provider prior to
3.21.1
which was fixed. So if you’re using an old Kubernetes provider version, it’s likely fixed. If you’re using an older version then we need to file a new issue.
this is before k8s is even deployed
Then it’s likely you have an old provider version cached in your state
s
on a fresh docker image
there's no state yet
there's no kubeconfig
b
if you do
pulumi stack export
it’s empty?
s
I'll DM you my circleci config
these are fresh stacks
b
it’s is unlikely it’s related to anything with your CI
s
yea, they spin up brand new GCP projects, lay down infra w/Pulumi
Copy code
cd ~/repo/centegix-iac-pulumi/<<parameters.stack>>
gcloud config set project $PROJECT_ALIAS
pulumi stack init centegix-team/$PROJECT_ALIAS
pulumi config cp -s centegix-team/my-static-stack -d centegix-team/$PROJECT_ALIAS
pulumi stack select centegix-team/$PROJECT_ALIAS
pulumi config set gcp:project $PROJECT_ALIAS
pulumi config set environment ephemeral
pulumi config set subdomain ${CIRCLE_USERNAME,,}

n=0
until [ "$n" -ge 5 ] ; do
  pulumi up -y -s centegix-team/$PROJECT_ALIAS && break
  n=$((n+1))
  sleep 30
done
that's the basis of it