I am using this command to try and get a jenkins-x cluster set up and running :
jx create cluster aws --ng
I've also tried :
jx create cluster aws
the output looks like this :
Waiting to for a valid kops cluster state...
WARNING: retrying after error: exit status 2
error: Failed to successfully validate kops cluster state: after 25 attempts, last error: exit status 2
All help appreciated.
Try the kops validate cluster command as shown below
AWS_ACCESS_KEY_ID=<YOUR_KEY_HERE> AWS_SECRET_ACCESS_KEY=<YOUR_SECRET_KEY_HERE> kops validate cluster --wait 10m --state="s3://<YOUR_S3_BUCKET_NAME_HERE>" --name=<YOUR_CLUSTER_NAME_HERE>
Related
I am trying to create an application load balancer controller on my EKS cluster by following
this link
When I run these steps (after making the necessary changes to the downloaded yaml file)
curl -o v2_1_2_full.yaml https://raw.githubusercontent.com/kubernetes-sigs/aws-load-balancer-controller/v2.1.2/docs/install/v2_1_2_full.yaml
kubectl apply -f v2_1_2_full.yaml
I get this output
customresourcedefinition.apiextensions.k8s.io/targetgroupbindings.elbv2.k8s.aws configured
mutatingwebhookconfiguration.admissionregistration.k8s.io/aws-load-balancer-webhook configured
role.rbac.authorization.k8s.io/aws-load-balancer-controller-leader-election-role unchanged
clusterrole.rbac.authorization.k8s.io/aws-load-balancer-controller-role configured
rolebinding.rbac.authorization.k8s.io/aws-load-balancer-controller-leader-election-rolebinding unchanged
clusterrolebinding.rbac.authorization.k8s.io/aws-load-balancer-controller-rolebinding unchanged
service/aws-load-balancer-webhook-service unchanged
deployment.apps/aws-load-balancer-controller unchanged
validatingwebhookconfiguration.admissionregistration.k8s.io/aws-load-balancer-webhook configured
Error from server (InternalError): error when creating "v2_1_2_full.yaml": Internal error occurred: failed calling webhook "webhook.cert-manager.io": Post https://cert-manager-webhook.cert-manager.svc:443/mutate?timeout=10s: no endpoints available for service "cert-manager-webhook"
Error from server (InternalError): error when creating "v2_1_2_full.yaml": Internal error occurred: failed calling webhook "webhook.cert-manager.io": Post https://cert-manager-webhook.cert-manager.svc:443/mutate?timeout=10s: no endpoints available for service "cert-manager-webhook"
The load balancer controller doesnt appear to start up because of this and never gets to the ready state
Has anyone any suggestions on how to resolve this issue?
Turns out the taints on my nodegroup prevented the cert-manager pods from starting on any node.
These commands helped debug and led me to a fix for this issue:
kubectl get po -n cert-manager
kubectl describe po <pod id> -n cert-manager
My solution was to create another nodeGroup with no taints specified. This allowed the cert-manager to run.
I want to see logs of my elastic beanstalk environment in the command line, for which I'm doing the following:
eb logs --cloudwatch-logs enable --cloudwatch-log-source instance Humboialpha2021-env
However, I'm seeing the following error:
Enabling instance log streaming to CloudWatch for your environment
After the environment is updated you can view your logs by following the link:
https://console.aws.amazon.com/cloudwatch/home?region=us-east-1#logs:prefix=/aws/elasticbeanstalk/Humboialpha2021-env/
Printing Status:
2021-03-27 16:19:05 INFO Environment update is starting.
2021-03-27 16:19:16 INFO Updating environment Humboialpha2021-env's configuration settings.
2021-03-27 16:19:54 INFO Instance deployment successfully detected a JAR file in your source bundle.
2021-03-27 16:19:57 INFO Instance deployment successfully generated a 'Procfile'.
2021-03-27 16:19:58 ERROR Instance deployment failed. For details, see 'eb-engine.log'.
2021-03-27 16:20:02 ERROR [Instance: i-04fb7a3d67a219ca7] Command failed on instance. Return code: 1 Output: Engine execution has encountered an error..
2021-03-27 16:20:02 INFO Command execution completed on all instances. Summary: [Successful: 0, Failed: 1].
2021-03-27 16:20:02 ERROR Unsuccessful command execution on instance id(s) 'i-04fb7a3d67a219ca7'. Aborting the operation.
2021-03-27 16:20:03 ERROR Failed to deploy configuration.
ERROR: ServiceError - Failed to deploy configuration.
How to fix this?
Stumped on this issue and hoping someone who knows more can help me.
Trying to follow a guide with a proof of concept for cluster autoscaling on AWS for Kubernetes (https://renzedevries.wordpress.com/2017/01/10/autoscaling-your-kubernetes-cluster-on-aws/). I built my cluster on AWS using kops following this guide (https://medium.com/containermind/how-to-create-a-kubernetes-cluster-on-aws-in-few-minutes-89dda10354f4).
The issue appears to be with the cluster autoscaling deployment. When I run:
kubectl logs cluster-autoscaler-
I get the following output:
I0706 13:26:36.338072 1 leaderelection.go:210] failed to renew
lease kube-system/cluster-autoscaler
I0706 13:26:38.776977 1 leaderelection.go:210] failed to renew
lease kube-system/cluster-autoscaler
I0706 13:26:43.119763 1 leaderelection.go:210] failed to renew
lease kube-system/cluster-autoscaler
I0706 13:26:47.116439 1 leaderelection.go:210] failed to renew
I've been looking into the error and it was to do with the namespace. When I run the pod in a different namespace or the namespace recommended (kube-system - https://github.com/kubernetes/contrib/issues/2402) I still get the same error. Not sure what it causing it.
Thanks in advance for the help!
Follow this guide here to configure Cluster Autoscaler for Kubernetes running in AWS.
Configure Cluster Autoscaler in Kubernetes
It should do the work without any errors.
I am actually trying to deploy my application using Kubernetes in the AWS Kops. For this i followed the steps given in the AWS workshop tutorial.
https://github.com/aws-samples/aws-workshop-for-kubernetes/tree/master/01-path-basics/101-start-here
I created a AWS Cloud9 environment by logging in as a IAM user and installed kops and other required software's as well. When i try to create the cluster using the following command
kops create cluster --name cs.cluster.k8s.local --zones $AWS_AVAILABILITY_ZONES
--yes
i get an error like below in the cloud9 IDE
error running tasks: deadline exceeded executing task IAMRole/nodes.cs.cluster.k8s.local. Example error: error creating IAMRole: InvalidClientTokenId: The security token included in the request is invalid
status code: 403, request id: 30fe2a97-0fc4-11e8-8c48-0f8441e73bc3
I am not able to find a way to solve this issue. Any help on this would be appreciable.
I found the issue and fixed it. Actually
I did not export the following 2 environment variables in the terminal where I am running create cluster. These 2 below variables are required while creating a cluster using kops
export AWS_ACCESS_KEY_ID=$(aws configure get aws_access_key_id)
export AWS_SECRET_ACCESS_KEY=$(aws configure get aws_secret_access_key)
I tried to setup EB for worker tier by using the following command
eb create -t worker
But I receive the following error
2015-11-04 16:44:01 UTC+0800 ERROR Stack named 'awseb-e-wh4epksrzi-stack' aborted operation. Current state: 'CREATE_FAILED' Reason: The following resource(s) failed to create: [AWSEBWorkerCronLeaderRegistry, AWSEBSecurityGroup].
2015-11-04 16:43:58 UTC+0800 ERROR Creating security group named: sg-7ba1f41e failed Reason: Resource creation cancelled
Is there something specific to run the command line ?
I found the eb command line buggy. try to use the web console. much more reliable.