• Kubernetes Submit Queue's avatar
    Merge pull request #31767 from asalkeld/bad-context-error · 60b63b7c
    Kubernetes Submit Queue authored
    Automatic merge from submit-queue
    
    Add a check in ConfirmUsable() to validate the contextName
    
    **What this PR does / why we need it**:
    When a context name is provided, but can't be found (miss spelling), it currently
    uses the defaults. This PR will cause the command to fail, to prevent unexpected side effects
    of using the wrong configuration.
    
    **Which issue this PR fixes**
    fixes #21062
    
    **Special notes for your reviewer**:
    None
    
    **Release note**:
    ```release-note
    Error if a contextName is provided but not found in the kubeconfig.
    ```
    60b63b7c
client_config.go 17.3 KB