cdk-eks-blueprints icon indicating copy to clipboard operation
cdk-eks-blueprints copied to clipboard

blueprints-addon-calico: Showing does not exist on deploy

Open ohschmidty opened this issue 3 years ago • 2 comments

Describe the bug

Receiving the following error when deploying:

Received response status [FAILED] from custom resource. Message returned: Error: b'Release "blueprints-addon-calico" does not exist. Installing it now.\nError: failed to install CRD crds/crds.yaml: unable to recognize "": no matches for kind "CustomResourceDefinition" in version "apiextensions.k8s.io/v1beta1"\n'

Expected Behavior

Should not see this error

Current Behavior

Error received and stack shows Failed status and I have to manually delete from CloudFormation

Reproduction Steps

Here is the code I am using (props.vpc is referenced from InfraStack stack):

InfraStack:

`export class InfraStack extends Stack { eksvpc: ec2.IVpc;

constructor(scope: Construct, id: string, props: StackProps) { super(scope, id, props);

this.eksvpc = new ec2.Vpc(this, 'eks-blueprint-vpc', {
  cidr: "10.0.0.0/16"
});

} }`

EksBlueprintStack

` interface ClusterProps extends cdk.StackProps { vpc: ec2.IVpc }

export class EksBlueprintStack extends Stack { constructor(scope: Construct, id: string, props: ClusterProps) { super(scope, id, props);

const clusterProps: eks_blueprints.MngClusterProviderProps = {
  vpc: props.vpc,
  vpcSubnets: [{ subnetType: ec2.SubnetType.PRIVATE_WITH_NAT  }],
  privateCluster: true,
  minSize: 1,
  maxSize: 10,
  desiredSize: 4,
  instanceTypes: [new ec2.InstanceType('m5.large')],
  amiType: eks.NodegroupAmiType.AL2_X86_64,
  nodeGroupCapacityType: eks.CapacityType.ON_DEMAND,
  version: eks.KubernetesVersion.V1_20
  // amiReleaseVersion: "1.20.11-20220429" // this will upgrade kubelet to 1.20.4
}

const addOns: Array<eks_blueprints.ClusterAddOn> = [
  new eks_blueprints.addons.ArgoCDAddOn,
  new eks_blueprints.addons.CalicoAddOn,
  new eks_blueprints.addons.MetricsServerAddOn,
  new eks_blueprints.addons.ClusterAutoScalerAddOn,
  new eks_blueprints.addons.ContainerInsightsAddOn,
  new eks_blueprints.addons.AwsLoadBalancerControllerAddOn(),
  new eks_blueprints.addons.VpcCniAddOn(),
  new eks_blueprints.addons.CoreDnsAddOn(),
  new eks_blueprints.addons.KubeProxyAddOn(),
  new eks_blueprints.addons.XrayAddOn()
];

const clusterProvider = new eks_blueprints.MngClusterProvider(clusterProps);

eks_blueprints.EksBlueprint.builder()
  .resourceProvider(eks_blueprints.GlobalResources.Vpc, new eks_blueprints.DirectVpcProvider(props.vpc))
  .clusterProvider(clusterProvider)
  .addOns(...addOns)
  .build(scope, 'eks-blueprint-testing');
}

} `

Possible Solution

Validate the current Kind and version for the calico CRD

Additional Information/Context

No response

CDK CLI Version

2.20.0

EKS Blueprints Version

1.0.0

Node.js Version

16.15.0

Environment details (OS name and version, etc.)

macos 12.3.1

Other information

No response

ohschmidty avatar May 05 '22 17:05 ohschmidty

@daveschmidt86 was Calico used on a new clean cluster (new provisioning) or was it applied to an existing cluster? The reason why I ask: we are getting a flood of issues related to Calico on 1.22. I see the cluster version that you are using is 1.20 but if the cluster was pre-provisioned with 1.22 or you upgraded the cluster through console the issue may still be relevant. If the cluster exists, what is the output (server version) for kubectl version?

shapirov103 avatar May 10 '22 21:05 shapirov103

@daveschmidt86 I assume the issue was specific for 1.22, however #417 should address it.

shapirov103 avatar Jun 17 '22 14:06 shapirov103

@daveschmidt86 Do you still see this issue. If not please close this ticket.

elamaran11 avatar Mar 02 '23 16:03 elamaran11