amazon-eks

Amazon EKS: generate/update kubeconfig via python script

删除回忆录丶 提交于 2019-12-04 17:24:37
When using Amazon's K8s offering, the EKS service, at some point you need to connect the Kubernetes API and configuration to the infrastructure established within AWS. Especially we need a kubeconfig with proper credentials and URLs to connect to the k8s control plane provided by EKS. The Amazon commandline tool aws provides a routine for this task aws eks update-kubeconfig --kubeconfig /path/to/kubecfg.yaml --name <EKS-cluster-name> Question: do the same through Python/boto3 When looking at the Boto API documentation , I seem to be unable to spot the equivalent for the above mentioned aws

AWS EKS: How is the first user added to system:masters group by EKS

北慕城南 提交于 2019-12-04 09:38:40
问题 EKS documentation says "When you create an Amazon EKS cluster, the IAM entity (user or role) is automatically granted system:master permissions in the cluster's RBAC configuration". But after the EKS cluster creation, if you check the aws-auth config map, it does NOT have the ARN mapping to system:masters group. But I am able to access the cluster via kubectl. So if the aws-auth (heptio config map) DOES NOT have the my ARN (I was the one who created the EKS cluster) mapped to system:masters

Terraform local-exec provisioner on an EC2 instance fails with “Permission denied”

那年仲夏 提交于 2019-12-04 05:47:39
问题 Trying to provision EKS cluster with Terraform. terraform apply fails with: module.eks_node.null_resource.export_rendered_template: Provisioning with 'local-exec'... module.eks_node.null_resource.export_rendered_template (local-exec): Executing: ["/bin/sh" "-c" "cat > /data_output.sh <<EOL\n#!/bin/bash -xe\n\nCA_CERTIFICATE_DIRECTORY=/etc/kubernetes/pki\nCA_CERTIFICATE_FILE_PATH=$CA_CERTIFICATE_DIRECTORY/ca.crt\nmkdir -p $CA_CERTIFICATE_DIRECTORY\necho \

EKS in private Subnet , Load Balancer in public subnet

风格不统一 提交于 2019-12-04 03:59:45
I am running EKS in private subnet and thus unable to create an internet facing load balancer but was able to create Internal LoadBalancer. Is there any way I can create Loadbalancer(probably Manually) in public subnet and point to the pods running in EKS in the private subnet. I was thinking of creating the chain of load balancer in which External load balancer will point to internal load balancer but that too is not possible as the IP address of the internal load balancer is reserved IP. Can I try some other way to route the traffic from the internet to pod? I had the same issue and it was

Kubernetes pod pending when a new volume is attached (EKS)

醉酒当歌 提交于 2019-12-04 02:48:56
Let me describe my scenario: TL;DR When I create a deployment on Kubernetes with 1 attached volume, everything works perfectly. When I create the same deployment, but with a second volume attached (total: 2 volumes), the pod gets stuck on "Pending" with errors: pod has unbound PersistentVolumeClaims (repeated 2 times) 0/2 nodes are available: 2 node(s) had no available volume zone. Already checked that the volumes are created in the correct availability zones. Detailed description I have a cluster set up using Amazon EKS, with 2 nodes. I have the following default storage class: kind:

AWS EKS: How is the first user added to system:masters group by EKS

瘦欲@ 提交于 2019-12-03 03:41:16
EKS documentation says "When you create an Amazon EKS cluster, the IAM entity (user or role) is automatically granted system:master permissions in the cluster's RBAC configuration". But after the EKS cluster creation, if you check the aws-auth config map, it does NOT have the ARN mapping to system:masters group. But I am able to access the cluster via kubectl. So if the aws-auth (heptio config map) DOES NOT have the my ARN (I was the one who created the EKS cluster) mapped to system:masters group, how does the heptio aws authenticator authenticate me? I got to know the answer. Basically on the

Kubernetes ingress-nginx gives 502 error (Bad Gateway)

坚强是说给别人听的谎言 提交于 2019-12-02 07:01:44
问题 I have an EKS cluster for which I want : - 1 Load Balancer per cluster, - Ingress rules to direct to the right namespace and the right service. I have been following this guide : https://www.digitalocean.com/community/tutorials/how-to-set-up-an-nginx-ingress-with-cert-manager-on-digitalocean-kubernetes My deployments: apiVersion: apps/v1 kind: Deployment metadata: name: hello-world namespace: default spec: replicas: 3 selector: matchLabels: app: hello-world template: metadata: labels: app:

EKS - Node labels

痴心易碎 提交于 2019-12-01 16:15:34
Is there a way to add node labels when deploying worker nodes in EKS. I do not see an option in the CF template available for worker nodes. EKS-CF-Workers The only option I see right now is to use kubectl label command to add labels which is post cluster setup. However, the need to have complete automation which means applications are deployed automatically post cluster deployments and labels help in achieving the segregation. Luis Govea With the new EKS-optimized AMIs(amazon-eks-node-vXX) and Cloudformation template refactors provided by AWS it is now possible to add node labels as simple as

Elasticsearch fails to start on AWS kubernetes cluster

可紊 提交于 2019-12-01 04:05:09
问题 I am running my kubernetes cluster on AWS EKS which runs kubernetes 1.10. I am following this guide to deploy elasticsearch in my Cluster elasticsearch Kubernetes The first time I deployed it everything worked fine. Now, When I redeploy it gives me the following error. ERROR: [2] bootstrap checks failed [1]: max file descriptors [4096] for elasticsearch process is too low, increase to at least [65536] [2018-08-24T18:07:28,448][INFO ][o.e.n.Node ] [es-master-6987757898-5pzz9] stopping ...

The connection to the server localhost:8080 was refused - did you specify the right host or port?

ε祈祈猫儿з 提交于 2019-11-30 07:28:53
问题 when i am trying to test the configuration of kubectl kubectl get svc i am getting this error: the server doesn't have a resource type "svc" when I try this command kubectl get services i am getting error:The connection to the server localhost:8080 was refused - did you specify the right host or port? and i am following this userguide to deploy a kubernetes application on my mac https://docs.aws.amazon.com/eks/latest/userguide/getting-started.html#eks-create-cluster Admins-MacBook-Pro:~