Getting a lot of warnings now when I spin up an EK...
# kubernetes
b
Getting a lot of warnings now when I spin up an EKS cluster using the Pulumi EKS Cluster API. The warnings look like this:
Copy code
Warning: resource customresourcedefinitions/eniconfigs.crd.k8s.amazonaws.com is missing the kubectl.kubernetes.io/last-applied-configuration annotation which is required by kubectl apply. kubectl apply should only be used on resources created declaratively by either kubectl create --save-config or kubectl apply. The missing annotation will be patched automatically.
Warning: resource customresourcedefinitions/policyendpoints.networking.k8s.aws is missing the kubectl.kubernetes.io/last-applied-configuration annotation which is required by kubectl apply. kubectl apply should only be used on resources created declaratively by either kubectl create --save-config or kubectl apply. The missing annotation will be patched automatically.
Is there some argument to
eks.Cluster
that resolves this? Thanks.
m
It looks like you are missing CRDs from
aws-vpc-cni
addon
a
I have the same thing, following the guide on EKS So we need to add a step to add the aws-vpc-cni ? The cni look installed in the aws-node daemonset already
m
@abundant-air-42661, if you didn't install aws-vpc-cni, CRDs aren't there. I'm using the addons feature -> https://www.pulumi.com/registry/packages/aws/api-docs/eks/addon/
b
@mammoth-electrician-64525 thanks for that info....didn't know I could do an addon in that way. I was going to use Helm to try to do it.
m
@busy-barista-3617 it depends on your needs, you can check in the AWS web console what add-ons you can add in your cluster. I use vpc, ebs, coredns and kube proxy but it is based on my needs.
b
@mammoth-electrician-64525 I also added the EBS one...thought that these were going to be add-ed-on automatically since I'm using EKS...but found out the hard way when trying to deploy into the cluster.
@mammoth-electrician-64525 Doing the EBS one took awhile as I was using Helm and had to figure out the permissions for that. Is there a particular order that you need to install the add ons in?
m
EKS add-ons are Kubernetes operators but AWS called them as add-ons like a special operators approved by them.
@busy-barista-3617 for EBS you need to add a policy and role, please check it out here -> https://docs.aws.amazon.com/eks/latest/userguide/csi-iam-role.html
b
how are you creating your cluster? I'm using the pulumi_eks cluster API. Just tried to add on and got this error:
Copy code
create: unexpected state 'CREATE_FAILED', wanted target 'ACTIVE'. last error: : ConfigurationConflict: Conflicts found when trying to apply. Will not continue due to resolve conflicts mode. Conflicts:
    ServiceAccount aws-node - .<http://metadata.labels.app.kubernetes.io/version|metadata.labels.app.kubernetes.io/version>
    ConfigMap amazon-vpc-cni - .<http://metadata.labels.app.kubernetes.io/version|metadata.labels.app.kubernetes.io/version>
    <http://ClusterRole.rbac.authorization.k8s.io|ClusterRole.rbac.authorization.k8s.io> aws-node - .<http://metadata.labels.app.kubernetes.io/version|metadata.labels.app.kubernetes.io/version>
    <http://ClusterRoleBinding.rbac.authorization.k8s.io|ClusterRoleBinding.rbac.authorization.k8s.io> aws-node - .<http://metadata.labels.app.kubernetes.io/version|metadata.labels.app.kubernetes.io/version>
    DaemonSet.apps aws-node - .<http://metadata.labels.app.kubernetes.io/version|metadata.labels.app.kubernetes.io/version>
    DaemonSet.apps aws-node - .spec.template.spec.containers[name="aws-eks-nodeagent"].image
    DaemonSet.apps aws-node - .spec.template.spec.containers[name="aws-node"].image
    ...
Have you seen this before?
m
I'm using the AWS classic package. EKS package doesn't offer me a good work group nodes.