Giter VIP home page Giter VIP logo

autok3s's People

Contributors

631068264 avatar catfishlty avatar dependabot[bot] avatar jaciechao avatar jason-zw avatar lalyos avatar newgr8player avatar niusmallnan avatar orangedeng avatar rancher-sy-bot avatar smallteeths avatar sunyakun avatar ysicing avatar yzeng25 avatar zsnmwy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

autok3s's Issues

Autok3s cluster failed to start using docker

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

Support Aliyun Cloud Provider

Need to support Aliyun(implements aliyun cloud provider):

APIs

  • ecs.RunInstances
  • ecs.DescribeInstances
  • ecs.DescribeInstanceStatus
  • ecs.DeleteInstances
  • ecs.DescribeVSwitches
  • ecs.DescribeVpcs
  • ecs.ListTagResources
  • ecs.StartInstances
  • ecs.StopInstances
  • vpc.TagResources
  • vpc.ListTagResources
  • vpc.AllocateEipAddress
  • vpc.ReleaseEipAddress
  • vpc.AssociateEipAddress
  • vpc.UnassociateEipAddress

RAMs

{
    "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"
}

Components

  • AppHub
  • Terway
  • Cloud-Controller-Manager(Alibaba)

Support HA Mode

>= 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

Encrypt & Store Sensitive Data:

  1. credential data like (access-key/access-secret)
  2. cluster sensitive data like (cluster token/access-key/access-secret)

Refactor Instances Name Logic

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

By default, the docker service will not be automatically started in centos

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

The prompt message needs to be optimized

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%

Add cluster detailed information function

I hope there is a command to view the detailed information of the cluster created by autok3s, such as:

  1. What are the nodes and roles
  2. Public IP and Intranet IP of the node
  3. Node ID
  4. docker version
  5. Node status

Support ECS public IP

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

It is recommended to add confirmation operations when operating the cluster

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

Support Aliyun EIP

Currently, the virtual machine uses the temporarily assigned IP and we need to support the fixed IP.

Support Command Line

Need to support the command line:

  • autok3s version
  • autok3s list
  • autok3s create
  • autok3s delete
  • autok3s stop
  • autok3s start
  • autok3s remove
  • autok3s join
  • autok3s ssh
  • autok3s kubectl
  • autok3s completion

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.