- Run the minikube
minikube start --nodes 1
- Proxy and expose kubernetes server api
kubectl proxy --address='0.0.0.0' --accept-hosts='^*$'
- Expose the proxy port to access your cluster from outside
- Copy your k8s config to the remote machine from
~/.kube/config
and place it wherever you want - Edit the config:
- Change the cluster's ip in the config:
...
clusters:
- cluster:
extensions:
- extension:
last-update: Wed, 16 Feb 2022 22:11:43 MSK
provider: minikube.sigs.k8s.io
version: v1.21.0
name: cluster_info
server: http://<your-ip>:8001
name: minikube
...
- If you dont wanna copy your certs:
- Add
insecure-skip-tls-verify: true
to your cluster params:
name: cluster_info insecure-skip-tls-verify: true server: http://<your-ip>:8001 name: minikube
- Delete
certificate-authority
,client-certificate
andclient-key
lines from the config
- Add
- Tell k8s where your config is
export KUBECONFIG=<config-path>
or add to your shell config (.zshrc, .bashrc etc.)
- Use the context in k8s
kubectl config use-context minikube