{"tool":"doctl","tool_display":"Doctl","intent":"fetch-and-save-kubeconfig","intent_display":"fetch and save kubeconfig","title":"Doctl Command: fetch and save kubeconfig","command_string":"doctl k c cfg s <cluster_name>","raw_command_string":"doctl {{[k|kubernetes]}} {{[c|cluster]}} {{[cfg|kubeconfig]}} {{[s|save]}} {{cluster_name}}","description":"Exact CLI syntax to fetch and save kubeconfig using Doctl.","usage_scenario":"Before deploying applications directly to a Kubernetes cluster or integrating with CI/CD pipelines.","scenario_context":"Ensure your kubeconfig is correctly set before deploying applications.","simulated_output":"Fetching kubeconfig for cluster 'my-cluster'...\n\nKubeconfig saved to: /home/user/.kube/config\n\nCluster Name: my-cluster\nContext: my-cluster-context\n\n$ kubectl config get-contexts\n\nCURRENT   NAME                   CLUSTER              AUTHINFO              NAMESPACE\n*         my-cluster-context    my-cluster          my-cluster-admin     default","how_to_steps":["Run `doctl kubernetes cluster cfg kubeconfig save my-cluster` to fetch the config.","Verify the saved kubeconfig with `kubectl config get-contexts`."],"inferred_category":"Cloud Infrastructure","canonical_url":"https://www.syntaxstandard.com/doctl/fetch-and-save-kubeconfig"}