Argo CD Login and API: received unexpected content-type or TLS handshake timeout

My Argo CD is running on AWS EKS and is exposed via a standard Kubernetes Ingress (traefik class), meaning it also interacts with AWS ELB. Additionally, the server.insecure parameter in the Argo CD server is set to “true” (configured in the argocd-cmd-params-cm ConfigMap in Kubernetes), with TLS termination happening on the ingress side.

There are no issues with the Argo CD UI. However, I am unable to access the Argo CD API using simple curl requests or the Argo CD CLI. I keep receiving errors related to content-type and TLS handshake failures:

 argocd login argo.example.com --grpc-web --insecure --skip-test-tls
 FATA[0036] rpc error: code = Unknown desc = Post "https://argocd.example.com/session.SessionService/Create": net/http: TLS handshake timeout 
FATA[0045] rpc error: code = Unimplemented desc = unexpected HTTP status code received from server: 404 (Not Found); transport: received unexpected content-type "text/plain; charset=utf-8"

All requests are being sent from a WSL instance (Ubuntu 22.04). Note that I have no issues accessing the API when using port forwarding or when connecting from the management partition (local machine).

I was about to give up, but then I decided to check the MTU size.

Get-NetIPInterface -AddressFamily IPv4 | Sort-Object -Property NlMtu | Select ifIndex, InterfaceAlias, NlMtu -first 5
ifIndex InterfaceAlias            NlMtu
------- --------------            -----
     19 Ethernet 3                 1392
     20 Local Area Connection* 1   1500
      8 Ethernet (WSL)             1500

Ethernet 3 is my VPN interface, and the API is only reachable through this interface.

Ethernet is the interface that WSL uses, so an MTU mismatch is occurring.

The solution is to adjust the MTU to match 1392 (the exact value may vary).

In your WSL instance, run the following:

ifconfig # to list interfaces. note your main interface (eth0 typically)
sudo ifconfig eth0 mtu 1392 # to change MTU size

I hope it helps!

Technical Review: Amazon Web Services in Action, Third Edition

Amazon Web Services (AWS) is a comprehensive and widely adopted cloud computing platform provided by Amazon.com. Launched in 2006, AWS offers a vast array of cloud services to help individuals, businesses, and organizations build and deploy applications, store data, and manage their IT infrastructure more efficiently. Moreover, AWS is the longest-running Magic Quadrant Leader, with Gartner naming AWS a Leader for the thirteenth consecutive year.

The full Gartner Report

It’s rare to encounter a DevOps or Cloud engineer who hasn’t engaged with AWS. Even if one specializes in Azure or GCP, familiarity with AWS is almost essential, at least in theory. Personally, having spent over two years working with AWS, I’ve found the platform to be both seamless and captivating.

It’s no wonder that AWS remains a frontrunner in the market. Therefore, it’s crucial to have access to quality learning resources for efficiently mastering AWS. For me, AWS in Action, 3rd edition stands out as the ideal choice.

I have read AWS in Action, 2nd edition and had a privilege to review the 3rd edition in September, 2022. The authors, brothers Andreas Wittig and Michael Wittig are cloud consultants focusing on Amazon Web Services with years of experience, covered all the core services in clear, plain language, including services such as AWS Lambda and CloudFormation.

The book is full of real-world examples and written for mid-level developers and SysOps/DevOps Engineers. The short list of services covered in the book: EC2, CloudFormation, CloudWatch, integration with Jenkins, S3, Glacier, EBS, EFS, RDS, DynamoDB, ECS, Fargate, ElastiCache, Elastic Load Balancing and Simple Queue Service

Click to see the table of contents
  • Part 1: Getting started
  • Chapter 1 What is Amazon Web Services?
  • Chapter 2 A Simple Example: WordPress in Fifteen Minutes

Part 2: Building virtual infrastructure of computers and networking

  • Chapter 3 Using Virtual machines: EC2
  • Chapter 4 Programming Your Infrastructure: The command line, SDKs and CloudFormation
  • Chapter 5 Securing Your System: IAM, security groups and VPC
  • Chapter 6 Automating Operational Tasks with Lambda
  • Part 3: storing data in the cloud
  • Chapter 7 Storing Your Objects: S3 and Glacier
  • Chapter 8 Storing on Hard Drives: EBS and instance store
  • Chapter 9 Sharing Data Volumes Between Machines: EFS
  • Chapter 10 Using a Relational Database Service: RDS
  • Chapter 11 Caching Data in Memory: ElastiCache
  • Chapter 12 Programming for the NoSQL Database Service: DynamoDB
  • Part 4: Architecting on AWS
  • Chapter 13 Achieving High Availability: Availability zones, auto-scaling and CloudWatch
  • Chapter 14 Decoupling Your Infrastructure: Elastic Load Balancing and Simple Queue Service
  • Chapter 15 Automating Deployment
  • Chapter 16 Designing for Fault Tolerance
  • Chapter 17 Scaling up and down: Auto-scaling and CloudWatch
  • Chapter 18 Building Modern Architectures for the Cloud: ECS and Fargate

Pay attention to Part 4: Architecting on AWS. This part will help you prevent outage of your applications running in AWS by implementing right architecture and set of tools. As a result, you will be able to design greenfield environments or plan migrations to AWS.

For DevOps and software engineers, services such as AWS Lambda, CodeDeploy, CloudFormation, HashiCorp’s Packer and integration of some services with Jenkins are also covered. So, you will be ready to automate your deployment after reading the book.

Overall, it’s highly recommended book to purchase. My favorite on AWS and, based on sales, it’s a bestseller in AWS category. Thanks Andreas Wittig and Michael Wittig for fundamental work and keeping the book up-to-date.