Hey All, i having issues deploying a EKS cluster w...
# kubernetes
m
Hey All, i having issues deploying a EKS cluster whilst using an existing VPC i keep getting the error
Copy code
Diagnostics:

  pulumi:pulumi:Stack (EKS-dev):
    Warning: Field 'items' does not exist on Object 'config.privateSubnetIds'

      on Pulumi.yaml line 21:

      21:     items:

    Existing fields are: 'name', 'type', 'secret', 'value', 'default'

    Unable to connect to the server: dial tcp 172.30.2.236:443: i/o timeout

    error: update failed 

  eks:index:VpcCni (eks-cluster-vpc-cni):

    error: Command failed: kubectl apply -f /var/folders/c5/dstyrm1x3518rf_bt2j9m1wh0000gn/T/tmp-19575U33DM6p76gNN.tmp

    Unable to connect to the server: dial tcp 172.30.2.236:443: i/o timeout
m
Can you show the relevant snippet of your Pulumi code/YAML?
m
Pulumi.yaml
Copy code
name: Micro_Services
runtime: yaml
description: A Pulumi YAML program to deploy an EKS cluster on AWS using only private subnets
config:
  desiredClusterSize:
    type: integer
    default: 3
  eksNodeInstanceType:
    type: string
    default: t3.medium
  maxClusterSize:
    type: integer
    default: 6
  minClusterSize:
    type: integer
    default: 3
  vpcId:
    type: string
  privateSubnetIds:
    type: array
    items:
      type: string
outputs:
  # Output the Kubeconfig for the cluster
  kubeconfig: ${eks-cluster.kubeconfig}
resources:
  eks-cluster:
    type: eks:Cluster
    properties:
      desiredCapacity: ${desiredClusterSize}
      # Use private subnets only
      endpointPrivateAccess: true
      endpointPublicAccess: false
      instanceType: ${eksNodeInstanceType}
      maxSize: ${maxClusterSize}
      minSize: ${minClusterSize}
      nodeAssociatePublicIpAddress: false
      privateSubnetIds: ${privateSubnetIds}
      vpcId: ${vpcId}
Pulumi.dev.yaml
Copy code
```
config:
  Micro_Services:desiredClusterSize: "3"
  Micro_Services:eksNodeInstanceType: t3.medium
  Micro_Services:maxClusterSize: "6"
  Micro_Services:minClusterSize: "3"
  Micro_Services:privateSubnetIds:
    - subnet-0030afccf2147ee3c
    - subnet-0429ed98e84b15994
  Micro_Services:vpcId: vpc-0934f132b76c3cae6
  Micro_Services:vpcNetworkCidr: 172.30.0.0/16
  aws:region: eu-west-2
  pulumi:template: kubernetes-aws-yaml
```
m
Not familiar with the YAML version of Pulumi, but this seems to be an incorrect syntax, or you're passing this in the wrong way:
Copy code
privateSubnetIds:
    type: array
    items:
      type: string
m
yea i think so
m
https://www.pulumi.com/docs/concepts/projects/project-file/#schemas suggests that it's correct but I can't find an example for it
https://www.pulumi.com/blog/project-config-mvp/#configuration-specification Here is one:
Copy code
config:
    subnets:
        type: array
        description: an array of subnets to create
        items:
            type: string
m
Thanks
m
I think the only suggestion I have is to see what happens if you drop the "items"