前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >Install MicroK8s on Windows

Install MicroK8s on Windows

作者头像
yaodo
发布2022-03-30 14:07:37
7360
发布2022-03-30 14:07:37
举报
文章被收录于专栏:netservice

k8s的小型版,microk8s是Ubuntu发布,minikube是kubernetes发布,还有个k3s。拉取镜像时会不好使,被墙了需使用内地镜像。

1. Overview

What is Kubernetes

Kubernetes clusters host containerised applications in a reliable and scalable way. Having DevOps in mind, Kubernetes makes maintenance tasks such as upgrades dead simple.

What is MicroK8s

MicroK8s is a CNCF certified upstream Kubernetes deployment that runs entirely on your workstation or edge device. Being a snap it runs all Kubernetes services natively (i.e. no virtual machines) while packing the entire set of libraries and binaries needed. Installation is limited by how fast you can download a couple of hundred megabytes and the removal of MicroK8s leaves nothing behind.

In this tutorial you’ll learn how to…

  • Install MicroK8s on Windows
  • Operate your Kubernetes cluster
  • Access the Kubernetes Dashboard

You will only need …

  • A Windows 10 machine with at least 8 GB of RAM and 40 GB storage
  • If you have Windows 10 Home edition, you will also need to install VirtualBox (Windows 10 Professional, Enterprise and Student editions include Hyper-v for virtualisation).

2. Installation

MicroK8s has a Windows installer that will take care of setting up the software for you.

Download the latest installer here.

The installer checks if Hyper-V is available and switched on. If you don’t have Hyper-v (e.g. on Windows 10 Home edition) it is possible to use VirtualBox as an alternative.

3. Configuring MicroK8s

You can now configure MicroK8s - the minimum recommendations are already filled in.

For information on changing the ‘Snap Track’, see the MicroK8s docs.

You can change this configuration at a later date by re-running the installer. Note that the Memory and Disk limits are initially set at the minimum values. If you are planning on running large workloads (e.g. kubeflow will require around 12GB RAM) you will want to set these higher.

4. Wait for MicroK8s to start

Run PowerShell or cmd to get a command line.

Now you can check to see when MicroK8s is up and running:

microk8s status --wait-ready

5. Access Kubernetes

MicroK8s bundles its own version of kubectl for accessing Kubernetes. Use it

to run commands to monitor and control your Kubernetes. For example, to view your node:

代码语言:javascript
复制
microk8s kubectl get nodes

…or to see the running services:

代码语言:javascript
复制
microk8s kubectl get services

6. Deploy an app

Of course, Kubernetes is meant for deploying apps and services. You can use

the kubectl command to do that as with any Kuberenetes. Try

installing a demo app:

代码语言:javascript
复制
microk8s kubectl create deployment kubernetes-bootcamp --image=gcr.io/google-samples/kubernetes-bootcamp:v1

It may take a minute or two to install, but you can check the status:

代码语言:javascript
复制
microk8s kubectl get pods

7. Use add-ons

MicroK8s uses the minimum of components for a pure, lightweight Kubernetes.

However, plenty of extra features are available with a few keystrokes using

“add-ons” – pre-packaged components that will provide extra capabilities

for your Kubernetes, from simple DNS management to machine learning with

Kubeflow!

To start it is recommended to add DNS management to facilitate communication

between services. For applications which need storage, the ‘storage’ add-on

provides directory space on the host. These are easy to set up:

代码语言:javascript
复制
microk8s enable dns storage

8. Starting and Stopping MicroK8s

MicroK8s will continue running until you decide to stop it. You can stop and

start MicroK8s with these simple commands:

代码语言:javascript
复制
microk8s stop

… will stop MicroK8s and its services. You can start again any time by running:

代码语言:javascript
复制
microk8s start

You can also just reinitialise your Kubernetes with microk8s reset.

9. Congratulations!

You now have your own Kubernetes, ready to deploy apps or experiment with.

本文系转载,前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文系转载前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • k8s的小型版,microk8s是Ubuntu发布,minikube是kubernetes发布,还有个k3s。拉取镜像时会不好使,被墙了需使用内地镜像。
  • 1. Overview
    • What is Kubernetes
      • What is MicroK8s
        • In this tutorial you’ll learn how to…
          • You will only need …
          • 2. Installation
          • 3. Configuring MicroK8s
          • 4. Wait for MicroK8s to start
          • 5. Access Kubernetes
          • 6. Deploy an app
          • 7. Use add-ons
          • 8. Starting and Stopping MicroK8s
          • 9. Congratulations!
          相关产品与服务
          容器服务
          腾讯云容器服务(Tencent Kubernetes Engine, TKE)基于原生 kubernetes 提供以容器为核心的、高度可扩展的高性能容器管理服务,覆盖 Serverless、边缘计算、分布式云等多种业务部署场景,业内首创单个集群兼容多种计算节点的容器资源管理模式。同时产品作为云原生 Finops 领先布道者,主导开源项目Crane,全面助力客户实现资源优化、成本控制。
          领券
          问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档