Skip to content
This repository has been archived by the owner on Oct 29, 2021. It is now read-only.

Latest commit

 

History

History
36 lines (31 loc) · 969 Bytes

0.Default-kubeconfig.md

File metadata and controls

36 lines (31 loc) · 969 Bytes

0. Save default kubeconfig

We will save the microk8s configuration file that allows us to interact with the kubernetes API. This configuration will use the insecure endpoint of the api. So you have to be very careful as it will not validate any security policy. We will only use this configuration file to perform requirements tasks of cluster configuration.

To save/generate this configuration file:

$ microk8s.config > .kube-insecure
$ cat .kube-insecure
apiVersion: v1
clusters:
- cluster:
    server: http://:8080
  name: microk8s-cluster
contexts:
- context:
    cluster: microk8s-cluster
    user: admin
  name: microk8s
current-context: microk8s
kind: Config
preferences: {}
users:
- name: admin
  user:
    username: admin

Let's configure this file as kubectl client configuration:

$ export KUBECONFIG=$(pwd)/.kube-insecure
$ kubectl get nodes
NAME     STATUS   ROLES    AGE   VERSION
pc1282   Ready    <none>   33s   v1.13.2