1 Star 0 Fork 0

梁钧皓 / MicroK8s 边缘实验环境

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

microk8s-homelab

Expose your MicroK8s homelab to the Internet

Architecture

MicroK8s homelab architecture

Developing

Fork and clone this repository, then navigate to the project root and follow the instructions below.

Install pre-commit hook (optional)

The pre-commit hook runs formatting and sanity checks such as tofu fmt to reduce the chance of accidentally submitting badly formatted code that would fail CI.

ln -s ../../hooks/pre-commit ./.git/hooks/pre-commit

Prerequisites

AWS

If deploying the resources to AWS, you'll need to install and set up AWS CLI v2 with a valid access key and secret key corresponding to an IAM administrator account.

OpenTofu

Install the latest version of OpenTofu. The version used is 1.6.1 at the time of writing (2024-02-10).

You'll also need an SSH key pair for remoting into your instance - generate this with ssh-keygen if you haven't already.

N.B. It is strongly advised to use a dedicated microk8s-homelab SSH key pair for remoting into your instance and reverse tunneling instead of your default SSH key pair (if exists).

Deploy

OpenTofu

export CLOUD_PROVIDER="aws"
export TF_VAR_email="webmaster@example.com" # replace me!
tofu -chdir="opentofu/${CLOUD_PROVIDER}/" init
tofu -chdir="opentofu/${CLOUD_PROVIDER}/" plan
tofu -chdir="opentofu/${CLOUD_PROVIDER}/" apply

The following OpenTofu variables are supported for AWS.

Variable Required Type Default Description
email Y string "webmaster@example.com" Required. Email address to use for Let's Encrypt notifications
profile - string "default" AWS profile to assume for AWS CLI v2 and OpenTofu
region - string "ap-east-1" AWS region to deploy the resources into
vpc_cidr - string "10.0.0.0/16" VPC CIDR block. Should be a valid RFC 1918 private subnet
subnet_cidr - string "10.0.1.0/24" Subnet CIDR block. Should be a valid subnet of the VPC CIDR block
ssh_pubkey_path - string "~/.ssh/microk8s-homelab.pub" Path to SSH public key. Evaluated with pathexpand() before use
instance_type - string "t3.micro" Instance type of MicroK8s reverse tunnel proxy

License

MIT

MIT License Copyright (c) 2024 Donald Sebastian Leung Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

把您的 MicroK8s 边缘节点曝光于互联网 展开 收起
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
1
https://gitee.com/donaldsebleung/microk8s-homelab.git
git@gitee.com:donaldsebleung/microk8s-homelab.git
donaldsebleung
microk8s-homelab
MicroK8s 边缘实验环境
master

搜索帮助