Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Deploy to AWS kubernetes fails at kubectl apply command

Mafer Suárez November 30, 2020

I am trying to make a deployment to the eks aws, this is my pipeline:

step:        
name"Deploy to TEST"        
deploymenttest        
script:          
pipeatlassian/aws-eks-kubectl run:1.3.1            
variables:              
AWS_ACCESS_KEY_ID${AWS_ACCESS_KEY_ID}              
AWS_SECRET_ACCESS_KEY${AWS_SECRET_ACCESS_KEY}              
AWS_DEFAULT_REGION${AWS_DEFAULT_REGION}              
CLUSTER_NAME"cluster-name"              
KUBECTL_COMMAND"apply"              
RESOURCE_PATH: "file.yaml"

 but I get this:

error: you must be logged in to the server (the server has asked for the client to provide credentials)

 

Please can you help me, I don't know what I'm doing wrong!

2 answers

1 vote
eric.jatiwaseso January 8, 2021

Hi,

I solved this issue after changed 

AWS_ACCESS_KEY_ID${AWS_ACCESS_KEY_ID}              
AWS_SECRET_ACCESS_KEY${AWS_SECRET_ACCESS_KEY}   

with aws access key and aws secret access key of the user who was created the EKS cluster 

0 votes
Mafer95 December 8, 2020

I solved the problem by updating the version of kubernetes, I was using version 1.16 and now with version 1.18 everything works fine.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events