0

I read How to run Serverless Kubernetes: AWS EKS on Fargate, and am wondering what the equivalent option for --fargate is in a config schema shown in Config file schema? I tried

$ eksctl create cluster --fargate -f config.yaml
Error: cannot use --fargate when --config-file/-f is set

I used this sample config file from Creating a cluster with Fargate support using a config file, but nowhere does is say where to set an equivalent --fargate option. Sure my cluster came up, but coredns Deployment was set up for ec2 instead of fargate so the pods would never deploy. IOW

$ kubectl get deployment coredns -o yaml
apiVersion: v1
kind: Deployment
metadata:
  annotations:
    ...
    eks.amazonaws.com/compute-type: ec2
spec:
  ...
  template:
    metadata:
      annotations:
        eks.amazonaws.com/compute-type: ec2

I had to

$ kubectl edit deployment coredns

and set the option this way.

    eks.amazonaws.com/compute-type: fargate

It took me 2 days to debug this (I'm new to Kubernetes) so it would've have been to nice to have been able to do this in the config file.

6
  • eksctl.io/usage/fargate-support/… (Following the EKS with fargate support link within your Config file schema link) – Tensibai Feb 19 at 23:41
  • Forgot to say: the link was a bit hidden within the fargate options :) – Tensibai Feb 19 at 23:54
  • @Tensibai, I used that link to model my config file, but WHERE does it implement the --fargate CLI option in the manifest to tell EKS to configure coredns in Fargate? I was able to create my EKS fargate cluster using the sample config file, but coredns was set up to deploy in ec2, not fargate. I updated my OP. – Chris F Feb 20 at 4:45
  • I'd need to see your config.yml, the exemple config use fargate as default for things in kube-system or default namespace, so I guess your declaration for coredns is not using any of these namespaces and thus fallback to an unknown namespace with no associated compute type and can't deploy. (or there's a bug in eksctl and it would need to open an issue against it on github) – Tensibai Feb 20 at 17:49
  • Probably relevant issue on github: github.com/weaveworks/eksctl/issues/3155 – Tensibai Feb 20 at 17:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.