Repository navigation
Fix rancher kubectl failing when a custom CA is configured - #711
Merged
Merged
Conversation
The kubectl command treated the CA certificates saved at login as a file path. The saved value is the PEM content itself, so every kubectl run after logging in with --cacert failed with "file name too long". A certificate pool that could not be built also returned no TLS config and no error. The kubectl command now builds its TLS config from the saved PEM content. Loading CA certificates from a file goes through the same PEM handling, and an empty certificate pool now returns an error.
pmatseykanets
requested review from
JonCrowther,
andreas-kupries and
bigkevmcd
October 8, 2026 21:26
bigkevmcd
approved these changes
Oct 9, 2026
andreas-kupries
approved these changes
Oct 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue: rancher/rancher#55988
Problem
The kubectl command treated the CA certificates saved at login as a file path. The saved value is the PEM content itself, so every kubectl run after logging in with --cacert failed with "file name too long". A certificate pool that could not be built also returned no TLS config and no error.
Solution
The kubectl command now builds its TLS config from the saved PEM content. Loading CA certificates from a file goes through the same PEM handling, and an empty certificate pool now returns an error.