Per the k3s docs here, copy the /etc/rancher/k3s/k3s.yaml from your controller to your local machine at ~/.kube/config.
Change the server ip to it’s actual ip, and then should be able to use kubectl against the remote cluster.

Articles, notes and random thoughts on Software Development and Technology
Per the k3s docs here, copy the /etc/rancher/k3s/k3s.yaml from your controller to your local machine at ~/.kube/config.
Change the server ip to it’s actual ip, and then should be able to use kubectl against the remote cluster.
To create a ‘hostPath’ PersistentVolume in a single node cluster (do not use in a cluster with more than 1 node):
kind: PersistentVolume
apiVersion: v1
metadata:
name: pv1
labels:
type: local
spec:
storageClassName: manual
capacity:
storage: 1Gi
accessModes:
- ReadWriteOnce
hostPath:
path: "/your-path-for-vol1"
If the above is pv1.yaml, apply with:
kubectl apply -f pv1.yaml
For more info, see the docs here.
Installing the MariaDB chart with Helm on Kubernetes, I ran into issues with permissions on the folder that I created for the PersistentVolume:
INFO ==> ** Starting MariaDB setup **
INFO ==> Validating settings in MYSQL_/MARIADB_ env vars..
INFO ==> Initializing mariadb database…
mkdir: cannot create directory '/bitnami/mariadb/data': Permission denied
INFO ==> Stopping mariadb…
Per similar question here, if you’re manually creating or reusing a PersistentVolume for MariaDB, you need to “chown -R 1001:1001 /pv-dir” on the PV directory, as the MariaDB container runs with userid 1001 and group 1001.
kubectl get all –all-namespaces | grep name
From here.