https://microk8s.io/

video guide:

sudo snap install microk8s --classic

#snap install microk8s --classic --channel=1.12/stable

#microk8s.status

microk8s.kubectl get all --all-namespaces

microk8s.kubectl get no

microk8s.enable dns dashboard

watch microk8s.kubectl get all --all-namespaces

microk8s.kubectl run nginx --image nginx --replicas 3

watch microk8s.kubectl get all --all-namespaces

microk8s.kubectl expose deployment nginx --port 80 --target-port 80 --type ClusterIP --selector=run=nginx --name nginx

watch microk8s.kubectl get all

wget 10.152.183.181

microk8s.kubectl delete deployment/nginx

watch microk8s.kubectl get all

microk8s.kubectl delete svc/nginx

microk8s.disable dashboard dns

watch microk8s.kubectl get all --all-namespaces

sudo snap remove microk8s

-----------------------------------------------------

doc guide

microk8s.kubectl get nodes
microk8s.kubectl get services
snap alias microk8s.kubectl kubectl   #改别名
snap unalias kubectl  #取消别名

If you already have kubectl installed and you want to use it to access the MicroK8s deployment you can export the cluster’s config with:

microk8s.kubectl config view --raw > $HOME/.kube/config

 

microk8s.enable dns dashboard
microk8s.disable dashboard dns
microk8s.status     #you can see the list of available add-ons and which ones are currently enabled.  

 

List of available add-ons

  • dns: Deploy kube dns. This add-on may be required by others thus we recommend you always enable it. In environments where the external dns servers 8.8.8.8 and 8.8.4.4 are blocked you will need to update the upstream dns servers in microk8s.kubectl -n kube-system edit configmap/kube-dns after enabling the add-on.
  • dashboard: Deploy Kubernetes dashboard as well as Grafana and InfluxDB. To access Grafana point your browser to the url reported by microk8s.kubectl cluster-info.
  • storage: Create a default storage class. This storage class makes use of the hostpath-provisioner pointing to a directory on the host. Persistent volumes are created under ${SNAP_COMMON}/default-storage. Upon disabling this add-on you will be asked if you want to delete the persistent volumes created.
  • ingress: Create an ingress controller.
  • gpu: Expose GPU(s) to MicroK8s by enabling the nvidia runtime and nvidia-device-plugin-daemonset. Requires NVIDIA drivers to be already installed on the host system.
  • istio: Deploy the core Istio services. You can use the microk8s.istioctl command to manage your deployments.
  • registry: Deploy a private image registry and expose it on localhost:32000. The storage add-on will be enabled as part of this add-on. See the registry documentation for more details.
  • metrics-server: Deploy the Metrics Server.
  • prometheus: Deploy the Prometheus Operator v0.25.
  • fluentd: Deploy the Elasticsearch-Kibana-Fluentd logging and monitoring solution.
  • jaeger: Deploy the Jaeger Operator v1.8.2 in the “simplest” configuration.

 

Configuring MicroK8s services

The following systemd services will be running in your system:

  • snap.microk8s.daemon-apiserver, is the kube-apiserver daemon started using the arguments in ${SNAP_DATA}/args/kube-apiserver
  • snap.microk8s.daemon-controller-manager, is the kube-controller-manager daemon started using the arguments in ${SNAP_DATA}/args/kube-controller-manager
  • snap.microk8s.daemon-scheduler, is the kube-scheduler daemon started using the arguments in ${SNAP_DATA}/args/kube-scheduler
  • snap.microk8s.daemon-kubelet, is the kubelet daemon started using the arguments in ${SNAP_DATA}/args/kubelet
  • snap.microk8s.daemon-proxy, is the kube-proxy daemon started using the arguments in ${SNAP_DATA}/args/kube-proxy
  • snap.microk8s.daemon-containerd, is the containerd daemon started using the configuration in ${SNAP_DATA}/args/containerd and ${SNAP_DATA}/args/containerd-template.toml.
  • snap.microk8s.daemon-etcd, is the etcd daemon started using the arguments in ${SNAP_DATA}/args/etcd

Normally, ${SNAP_DATA} points to /var/snap/microk8s/current.

To reconfigure a service you will need to edit the corresponding file and then restart the respective daemon. For example:

echo '-l=debug' | sudo tee -a /var/snap/microk8s/current/args/containerd
sudo systemctl restart snap.microk8s.daemon-containerd.service

microk8s的更多相关文章

  1. MicroK8s及KubeFlow安装文档

    安装简单的k8s大约有三种思路:minikube,microk8s,kubeadm.minikube 虽然是官方出品,但主要还是基于虚拟机做的设计.在 Linux 生产环境下,microk8s 可能是 ...

  2. microk8s 搭建

    一.简述 microk8s不通过虚拟机但与主机隔离方式,快速轻巧安装Kubernetes.通过在单个快照包中打包Kubernetes,Docker.io,iptables和CNI的所有上游二进制文件来 ...

  3. microk8s 1.14本地Registry及DNS配置

    microk8s 从1.14 开始, 使用containerd 代替原来自带的microk8s.docker, 据说是出于性能和与主机docker共存的考虑. 使用本地Registry加速镜像 mic ...

  4. 在 MacOS 中使用 multipass 安装 microk8s 环境

    在 MacOS 中使用 multipass 安装 microk8s 环境 Multipass & MicroK8s 介绍 What is Kubernetes? Kubernetes clus ...

  5. Microk8s 安装helm3

    Microk8s 安装helm3 原本使用官方的命令时这样的.但是使用的是官方的源,网络极不稳定.就出现了下面的状况.解决方法是更改为国内的源. microk8s enable helm3 curl: ...

  6. MicroK8S 安装 修改IP 设置镜像加速 升级 卸载等

    系统要求: Ubuntu 20.04 LTS, 18.04 LTS or 16.04 LTS或其他支持snapd的操作系统 内存:4G+ 硬盘:20G+ 官方文档 安装microk8s sudo sn ...

  7. CNCF CloudNative Landscape

    cncf landscape CNCF Cloud Native Interactive Landscape 1. App Definition and Development 1. Database ...

  8. 云原生生态周报 Vol. 17 | Helm 3 发布首个 beta 版本

    本周作者 | 墨封.衷源.元毅.有济.心水 业界要闻 1. Helm 3 首个 beta 版本 v3.0.0-beta.1 发布 该版本的重点是完成最后的修改和重构,以及移植其他 Helm 2 特性. ...

  9. Ubuntu 19.10 发布 | 云原生生态周报 Vol. 24

    作者 | 木苏.进超.冬岛.元毅.心水.衷源 业界要闻 1.云原生编程语言 Pulumi 1.0 pulumi ,一款中立的开源云开发平台,Pulumi 支持多语言.混合云环境.完全可扩展.初期支持 ...

随机推荐

  1. c#串口编程(转)

    在单片机项目开发中,上位机也是一个很重要的部分,主要用于数据显示(波形.温度等).用户控制(LED,继电器等),下位机(单片机)与 上位机之间要进行数据通信的两种方式都是基于串口的: USB转串口 — ...

  2. Java后端学习,推荐书籍和学习路线

    最近在学习Java和全栈开发,推荐一些有用的书籍 书架主要针对Java后端和全栈开发用的 书籍介绍 <Spring Boot 2.0企业级应用开发实战> 本书深入浅岀地讲解了 Spring ...

  3. UiAutomator2.0 - Toast信息的验证

    目录 问题:在做UI自动化测试时,偶尔会碰到 Toast 这种提示信息(如图),通过Uiautomatorviewer 无法获该类控件的信息.所以无法验证,该条case不能实现.然后就没然后了... ...

  4. 2142: 逛超市(zznuoj)

    2142: 逛超市 时间限制: 1 Sec  内存限制: 128 MB提交: 82  解决: 43[提交] [状态] [讨论版] [命题人:admin] 题目描述 “别人总说我瓜,其实我一点也不瓜,大 ...

  5. iOS开发之HTTP与HTTPS网络请求

    HTTP是互联网中应用最为广泛的一种网络协议,在进入正文之前,先解释什么是网络协议?网络协议为计算机网络中进行数据交换而建立的规则.标准或约定的集合.网络协议是由以下三个要素组成:语义.语法.时序.国 ...

  6. Java遍历Map对象的四种方式

    关于java中遍历map具体哪四种方式,请看下文详解吧. 方式一 :这是最常见的并且在大多数情况下也是最可取的遍历方式.在键值都需要时使用. Map<Integer, Integer> m ...

  7. JAVA操作证书

    一.生成证书工具keytool Java自带的工具keytool可以用来生成密钥证书,也可以查看或删除证书库里的证书.无论是windows还是Linux系统,这个工具都会出现在jdk安装目录的bin文 ...

  8. 【转】【Android】1分钟不用改任何代码在Eclipse中使用AAR

    原文:https://www.jianshu.com/p/ccf306e08d5b?hmsr=toutiao.io&utm_medium=toutiao.io&utm_source=t ...

  9. 浅谈Java语言中try{}catch{}和finally{}的执行顺序问题

    浅谈Java语言中try{}catch{}和finally{}的执行顺序问题 2019-04-06  PM  13:41:46  1. 不管有没有出现异常,finally块中代码都会执行: 2. 当t ...

  10. 记录一些基本的git命令

    本地操作 向git仓库添加文件 git status    查看工作区文件状态 git add a.php   将文件添加到暂存区 git commit -m  "描述"   将文 ...