项目作者: ebauman

项目描述 :
Tool for auto-registering Kubernetes clusters with Rancher
高级语言: Go
项目地址: git://github.com/ebauman/moo.git
创建时间: 2020-05-26T20:30:02Z
项目社区:https://github.com/ebauman/moo

开源协议:

下载


Maintenance

This project is no longer being maintained. For an alternative, please see https://github.com/rancher/fleet,
especially agent self-registration.

If you have interest in maintaining this, or a use case for it, please open an issue.

Server, agent, mooctl functionality is not guaranteed. This was heavily a work-in-progress at time of maintenance cessation.

Moo

Moo is a tool to auto-register Kubernetes (or k3s) clusters with a Rancher instance.

The driving force for this project was not wanting to interact with a k3s node after deployment,
but still have it register in Kubernetes.

Usage

Standalone

  1. NAME:
  2. moo - Auto-registration agent for Rancher imported clusters
  3. USAGE:
  4. agent [global options] command [command options] [arguments...]
  5. COMMANDS:
  6. help, h Shows a list of commands or help for one command
  7. GLOBAL OPTIONS:
  8. --kubeconfig value kubeconfig if running outside of cluster (default: "/Users/ebauman/.config/k3d/moo/kubeconfig.yaml") [$KUBECONFIG]
  9. --namespace value namespace used in registration check (default: "cattle-system") [$CATTLE_NAMESPACE]
  10. --deployment value name of deployment used in registration check (default: "cattle-cluster-agent") [$CATTLE_DEPLOYMENT]
  11. --daemonset value name of daemonset used in registration check (default: "cattle-node-agent") [$CATTLE_DAEMONSET]
  12. --rancher-url value url of rancher instance [$RANCHER_URL]
  13. --rancher-access-key value access key for rancher [$RANCHER_ACCESS_KEY]
  14. --rancher-secret-key value secret key for rancher [$RANCHER_SECRET_KEY]
  15. --cluster-name value name of this cluster when registering with rancher [$MOO_CLUSTER_NAME]
  16. --rancher-insecure use an insecure connection to rancher (default: false) [$RANCHER_INSECURE]
  17. --rancher-cacerts value path to cacerts file used when connecting to rancher [$RANCHER_CA_CERTS]
  18. --loglevel value log level (trace, debug, info, warning, error, fatal, panic) (default: "info") [$LOGLEVEL]
  19. --use-existing-cluster if cluster already exists in rancher, use it and import this node (default: false) [$MOO_USE_EXISTING]
  20. --help, -h show help (default: false)

Kubernetes Cluster

Check out kubernetes.yaml for a manifest to deploy moo-agent into your cluster.

If you’re using k3s, this manifest can be placed in /var/lib/rancher/k3s/server/manifests which will auto-deploy
the moo-agent Job upon server installation.

Building

  1. cd agent/
  2. go build

Contributing

Please file issues for enhancements, upgrades, bugs, etc.