Assuming your config file is at $KUBECONFIG (default ~/.kube/config) follow these steps to remove clusters/contexts/users from it:
- get clusters and contexts in the config
$ kubectl config get-contexts
| apiVersion: v1 | |
| kind: Service | |
| metadata: | |
| name: nginx | |
| labels: | |
| app: nginx | |
| spec: | |
| selector: | |
| app: nginx | |
| ports: |
| ### Keybase proof | |
| I hereby claim: | |
| * I am ssro on github. | |
| * I am sssro (https://keybase.io/sssro) on keybase. | |
| * I have a public key whose fingerprint is 192C 2E8E 719F 3823 8C5E 34A8 B061 9688 F054 9F31 | |
| To claim this, I am signing this object: |
Recipes from here, cooked and baked by ssro
AWS environment, K3S kubernetes environment
Make sure that the instance used for this setup has Route53 permissions (proper instance role)
Can use persistent volumes or attached disk. In this case, there's a disk attached to the instance as /data and XFS formatted
For this particular setup we will need 3 machines to act as kubernetes (k3s) masters and one machine to act as a datastore
The datastore will be a mysql (mariadb) server although you can choose different options
The operating system chosen for this task is Debian 11 (theoretically the setup can be performed on any linux machine)
You need to have the cluster's ca.crt and ca.key to sign the client csr. For kops, the cluster ca key and crt are located inside S3 bucket (KOPS_STATE_STORE) in <bucket_name>/[..]/pki/issued/ca/ and <bucket_name>/[..]/pki/private/ca/ folders. Also the cluster has to be built with RBAC