Get Kubernetes config for running cluster

If you have running cluster in AWS, and need to give your kubernetes access to it, you can export KUBECONF from that cluster:

# This command will create new context $NAME.k8s.local in your default
# KUBECONFIG file
kops export kubecfg $NAME.k8s.local --state=s3://$NAME-kops-state

If you want to create separate file with access to this exact cluster:

# Run the following line:
export KUBECONFIG=<path_to_new_kubeconfig>
# And then run export command:
kops export kubecfg $NAME.k8s.local --state=s3://$NAME-kops-state

# Then you'll be able to run commands in this cluster:
# KUBECONFIG=<path_to_new_kubeconfig> kops get pods -n <namespace>

results matching ""

    No results matching ""