name: microk8s summary: Kubernetes for workstations and appliances publisher: Canonical✓ contact: https://github.com/ubuntu/microk8s license: Apache-2.0 description: | MicroK8s is a small, fast, secure, single node Kubernetes that installs on just about any Linux box. Use it for offline development, prototyping, testing, or use it on a VM as a small, cheap, reliable k8s for CI/CD. It's also a great k8s for appliances - develop your IoT apps for k8s and deploy them to MicroK8s on your boxes. snap-id: EaXqgt1lyCaxKaQCU349mlodBkDCXRcg channels: stable: v1.15.2 2019-08-05 (743) 192MB classic candidate: v1.15.3 2019-08-20 (778) 171MB classic beta: v1.15.3 2019-08-20 (778) 171MB classic edge: v1.15.3 2019-09-04 (826) 171MB classic 1.16/stable: – 1.16/candidate: – 1.16/beta: v1.16.0-beta.1 2019-08-23 (799) 173MB classic 1.16/edge: v1.16.0-alpha.3 2019-08-23 (798) 173MB classic 1.15/stable: v1.15.2 2019-08-06 (745) 192MB classic ...
Applying manifest secret/kubernetes-dashboard-certs created serviceaccount/kubernetes-dashboard created role.rbac.authorization.k8s.io/kubernetes-dashboard-minimal created rolebinding.rbac.authorization.k8s.io/kubernetes-dashboard-minimal created deployment.apps/kubernetes-dashboard created service/kubernetes-dashboard created service/monitoring-grafana created service/monitoring-influxdb created service/heapster created deployment.extensions/monitoring-influxdb-grafana-v4 created serviceaccount/heapster created clusterrolebinding.rbac.authorization.k8s.io/heapster created configmap/heapster-config created configmap/eventer-config created deployment.extensions/heapster-v1.5.2 created
If RBAC is not enabled access the dashboard using the default token retrieved with:
In an RBAC enabled setup (microk8s.enable RBAC) you need to create a user with restricted permissions as shown in https://github.com/kubernetes/dashboard/wiki/Creating-sample-user
接着执行:
1
microk8s.enable dns
系统显示:
1 2 3 4 5 6 7 8 9 10 11
Enabling DNS Applying manifest serviceaccount/coredns created configmap/coredns created deployment.apps/coredns created service/kube-dns created clusterrole.rbac.authorization.k8s.io/coredns created clusterrolebinding.rbac.authorization.k8s.io/coredns created Restarting kubelet [sudo] password for stu: DNS is enabled