Editing ~/.kube/config
Jump to navigation
Jump to search
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 1: | Line 1: | ||
[[~/.kube/]]config | [[~/.kube/]]config | ||
− | |||
[[apiVersion]]: v1 | [[apiVersion]]: v1 | ||
clusters: null | clusters: null | ||
− | + | contexts: null | |
current-context: "" | current-context: "" | ||
[[kind: Config]] | [[kind: Config]] | ||
preferences: {} | preferences: {} | ||
− | + | users: null | |
Line 21: | Line 20: | ||
- cluster: | - cluster: | ||
certificate-authority-data: LS0tLS1CRUdJTiDATAREMOVEDCg== | certificate-authority-data: LS0tLS1CRUdJTiDATAREMOVEDCg== | ||
− | + | server: https://00AXXXXXXXXXX1B.gr7.us-east-2.eks.amazonaws.com | |
name: arn:aws:eks:us-east-2:123455:cluster/education-eks-Ry318DCv | name: arn:aws:eks:us-east-2:123455:cluster/education-eks-Ry318DCv | ||
[[contexts:]] | [[contexts:]] | ||
- context: | - context: | ||
cluster: arn:aws:eks:us-east-2:123456:cluster/education-eks-Ry318DCv | cluster: arn:aws:eks:us-east-2:123456:cluster/education-eks-Ry318DCv | ||
− | + | user: arn:aws:eks:us-east-2:123455:cluster/education-eks-Ry318DCv | |
name: arn:aws:eks:us-east-2:123456:cluster/education-eks-Ry318DCv | name: arn:aws:eks:us-east-2:123456:cluster/education-eks-Ry318DCv | ||
current-context: arn:aws:eks:us-east-2:123456:cluster/education-eks-Ry318DCv | current-context: arn:aws:eks:us-east-2:123456:cluster/education-eks-Ry318DCv | ||
[[kind: Config]] | [[kind: Config]] | ||
− | + | [[kind: Config]] | |
+ | preferences: {} | ||
+ | [[users:]] | ||
+ | - name: arn:aws:eks:us-east-2:123456:cluster/education-eks-Ry318DCv | ||
+ | user: | ||
+ | exec: | ||
+ | apiVersion: [[client.authentication.k8s.io]]/v1alpha1 | ||
+ | args: | ||
+ | - --region | ||
+ | - us-east-2 | ||
+ | - eks | ||
+ | - get-token | ||
+ | - --cluster-name | ||
+ | - education-eks-Ry318DCv | ||
+ | command: aws | ||
+ | env: | ||
+ | - name: [[AWS_PROFILE]] | ||
+ | value: [[your_aws_profile]] | ||
=== Example === | === Example === | ||
- name: your-cluster-name | - name: your-cluster-name | ||
− | + | user: | |
[[auth-provider:]] | [[auth-provider:]] | ||
[[config:]] | [[config:]] | ||
Line 56: | Line 72: | ||
[[aws --version]] | [[aws --version]] | ||
aws-cli/1.18.147 .../... | aws-cli/1.18.147 .../... | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
== Related == | == Related == | ||
* https://docs.aws.amazon.com/eks/latest/userguide/create-kubeconfig.html | * https://docs.aws.amazon.com/eks/latest/userguide/create-kubeconfig.html | ||
* <code>[[kubectl config]]</code> | * <code>[[kubectl config]]</code> | ||
− | |||
* <code>[[kubectl get nodes]]</code>, <code>[[kubectl get svc]]</code> | * <code>[[kubectl get nodes]]</code>, <code>[[kubectl get svc]]</code> | ||
− | * [[Terraform: Kubernetes provider]] | + | * [[Terraform: Kubernetes provider]] |
+ | * [[Config]] files | ||
* <code>[[aws eks get-token]]</code> | * <code>[[aws eks get-token]]</code> | ||
* [[Connect to K8s cluster]] | * [[Connect to K8s cluster]] | ||
Line 74: | Line 84: | ||
** [[GCP]]: <code>[[gcloud container clusters get-credentials]] [[MyClusterName]]</code> | ** [[GCP]]: <code>[[gcloud container clusters get-credentials]] [[MyClusterName]]</code> | ||
* <code>[[kubectl config rename-context]]</code> | * <code>[[kubectl config rename-context]]</code> | ||
− | |||
− | |||
− | |||
− | |||
− | |||
== See also == | == See also == | ||
* {{kubectl config}} | * {{kubectl config}} | ||
− | * {{ | + | * {{Terraform EKS}} |
[[Category:kubectl]] | [[Category:kubectl]] |
Advertising: