cnrancher / autok3s Goto Github PK
View Code? Open in Web Editor NEWRun K3s Everywhere
Home Page: http://rancher.com
License: Apache License 2.0
Run K3s Everywhere
Home Page: http://rancher.com
License: Apache License 2.0
Need Allow Specific INSTALL_K3S_VERSION
autok3s <sub-command> \
--k3s-version
autok3s k3s-versions
Use the --master-extra-args '--docker'
& --worker-extra-args '--docker'
parameter to start the autok3s cluster. The cluster can be created successfully, but the startup fails:
Sep 25 11:37:25 iZ2ze75abrpw8ky4hu2onxZ k3s[7684]: I0925 11:37:25.692147 7684 client.go:75] Connecting to docker on unix:///var/run/docker.sock
Sep 25 11:37:25 iZ2ze75abrpw8ky4hu2onxZ k3s[7684]: I0925 11:37:25.692351 7684 client.go:104] Start docker client with request timeout=2m0s
Sep 25 11:37:25 iZ2ze75abrpw8ky4hu2onxZ k3s[7684]: F0925 11:37:25.692740 7684 server.go:269] failed to run Kubelet: failed to create kubelet: failed to get docker version: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
Using curl https://get.docker.com | VERSION=19.03 sh -s - --mirror Aliyun
directly to install docker on the Alibaba Cloud host also fails. It is recommended to confirm the status of docker before starting K3S
Need to support Aliyun(implements aliyun cloud provider):
{
"Statement": [
{
"Action": [
"ecs:CreateNetworkInterface",
"ecs:DescribeNetworkInterfaces",
"ecs:AttachNetworkInterface",
"ecs:DetachNetworkInterface",
"ecs:DeleteNetworkInterface",
"ecs:DescribeInstanceAttribute",
"ecs:DescribeInstanceTypesNew",
"ecs:AssignPrivateIpAddresses",
"ecs:UnassignPrivateIpAddresses",
"ecs:DescribeInstances",
"ecs:DeleteInstances",
"ecs:DescribeInstanceStatus",
"ecs:RunInstances",
"ecs:ListTagResources",
"ecs:StartInstances",
"ecs:StopInstances"
],
"Resource": [
"*"
],
"Effect": "Allow"
},
{
"Action": [
"vpc:DescribeVSwitches",
"vpc:CreateVSwitch",
"vpc:DeleteVSwitch",
"vpc:DescribeVSwitches",
"vpc:DescribeVpcs",
"vpc:TagResources",
"vpc:AllocateEipAddress",
"vpc:AssociateEipAddress",
"vpc:DescribeEipAddresses",
"vpc:UnassociateEipAddress",
"vpc:ReleaseEipAddress",
"vpc:ListTagResources"
],
"Resource": [
"*"
],
"Effect": "Allow"
}
],
"Version": "1"
}
We should disable traefik by default when enabling ccm.
Need to add CI Process
>= 1.19.1-k3s1 support HA embedded `etcd` experimental mode which does not needed `--datastore-endpoint `flag.
< 1.19.1-k3s1 HA mode needed `--datastore-endpoint `flag.
Encrypt & Store Sensitive Data:
Need to support Aliyun Terway CNI plugin
Enhancement SSH Tunnel:
The current naming scheme does not satisfy certain scenarios and is vulnerable to intrusion. Need to use Tag
instead.
InstanceName: e.g.
autok3s.<cluster name>.<master>/<worker>
InstanceTags: e.g.
autok3s: true
cluster: <cluster name>
master: true
worker: false
Missing k3s-version
& k3s-channel
& etc... when execute start
& stop
& join
commands.
autok3s list
should add a status
field to mark the cluster status
✘ ksd@Ksd sudo autok3s list
NAME REGION PROVIDER MASTERS WORKERS
ksd-autok3s cn-beijing alibaba 1 2
update to v1.19.2-k3s1
Is it possible to connect to a node through autok3s ssh node
? Just like docker-machine ssh
If the host is a centos7.x operating system, after executing curl https://get.docker.com | VERSION=19.03 sh -s - --mirror Aliyun
, the docker server will not start automatically, and the docker service will not be automatically started after the host is started, so when starting for the first time, you need to add the following two commands:
systemctl start docker
systemctl enable docker
Autok3s Startup Success Logs:
=========================== Prompt Info ===========================
Use 'autok3s kubectl config use-context ksd-autok3s.cn-beijing'
Use 'autok3s kubectl get pods -A' get POD status%
After the K3S cluster is successfully started, some Prompt Info will be returned. These prompt messages should be added with the sudo
command, for example:
=========================== Prompt Info ===========================
Use 'sudo autok3s kubectl config use-context ksd-autok3s.cn-beijing'
Use 'sudo autok3s kubectl get pods -A' get POD status%
CNI Installer Image zhenyangzhao/cni-installer:v0.8.6
Need Support arm/arm64/amd64
I hope there is a command to view the detailed information of the cluster created by autok3s, such as:
Now autok3s only supports EIP, but it should also support ECS public IP, because some users may use the cluster for a short time, so there is no need to use EIP
--master-extra-args '--docker'
--worker-extra-args '--docker'
It is recommended to add a confirmation operation when operating autok3s delete
, otherwise, it is easy to misuse
ksd@Ksd ~ sudo autok3s delete \
--provider alibaba \
--region cn-beijing \
--name ksd-autok3s
INFO[0000] [alibaba] executing delete cluster logic...
INFO[0032] [alibaba] successfully excuted delete cluster logic
Using upx compress binaries.
Need to support alibaba cloud-controller-manager component
github.com/Jason-ZW/autok3s-charts
Need both compatible 1.18.x-k3sx
& 1.19.x-k3sx
Support Aliyun available zone. e.g. --zone cn-hangzhou-l
Normal users should be supported to run Autok3s
$ autok3s version
ERRO[0000] autok3s: need to be root
Currently, the virtual machine uses the temporarily assigned IP and we need to support the fixed IP.
Need to support the command line:
Currently, when choosing the Aliyun Provider
, the image pull speed is very slow, and we need to provide a way to solve this problem.
Containerd: Image pull stuck when using a registry endpoint list
v1.19.x-k3s1
Run autok3s delete --provider alibaba --name xxx -f
. Delete successful but instance still exist in Aliyun console.
This scenario only occurs when creating a cluster with --terway "eni"
and associate pod with ENI IP.
Need to support UI components for K3s cluster
Worker nodes missing 'cloud-provider=external' flag when ccm enable.
Need to Add More Documents:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.