https://github.com/dlisin/yandex-cloud-controller-manager
Kubernetes Cloud Controller Manager for Yandex.Cloud
https://github.com/dlisin/yandex-cloud-controller-manager
controller-manager golang kubernetes yandex-cloud
Last synced: about 2 months ago
JSON representation
Kubernetes Cloud Controller Manager for Yandex.Cloud
- Host: GitHub
- URL: https://github.com/dlisin/yandex-cloud-controller-manager
- Owner: dlisin
- License: apache-2.0
- Created: 2019-01-07T14:11:54.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2020-01-20T19:50:31.000Z (about 6 years ago)
- Last Synced: 2024-06-20T03:48:30.424Z (over 1 year ago)
- Topics: controller-manager, golang, kubernetes, yandex-cloud
- Language: Go
- Homepage:
- Size: 7.21 MB
- Stars: 6
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Kubernetes Cloud Controller Manager for Yandex.Cloud
[](https://travis-ci.org/dlisin/yandex-cloud-controller-manager)
[](https://goreportcard.com/report/github.com/dlisin/yandex-cloud-controller-manager)
[](https://codecov.io/gh/dlisin/yandex-cloud-controller-manager)
[](https://hub.docker.com/r/dlisin/yandex-cloud-controller-manager/)
## Overview
`yandex-cloud-controller-manager` is the Kubernetes Cloud Controller Manager (CCM) implementation for Yandex.Cloud.
It allows you to leverage many of the cloud provider features offered by Yandex.Cloud on your Kubernetes clusters.
Read more about Kubernetes CCM [here](https://kubernetes.io/docs/tasks/administer-cluster/running-cloud-controller/).
Currently `yandex-cloud-controller-manager` implements:
* `NodeController` - responsible for updating kubernetes nodes with cloud provider specific labels and addresses and deleting kubernetes nodes that were deleted on your cloud.
In the future, it may implement:
* `ServiceController` - responsible for creating LoadBalancers when a service of `Type: LoadBalancer` is created in Kubernetes.
* `RouteController` - responsible for creating firewall rules.
## Work In Progress
This project is currently under active development. Use at your own risk!
Contributions welcome!
## Getting Started
### Requirements
At the current state of Kubernetes, running Cloud Controller Manager (CCM) requires a few things.
Please read through the requirements carefully as they are critical to running CCM on a Kubernetes cluster on Yandex.Cloud.
#### Version
Kubernetes 1.11+
#### Cloud resources
* All Kubernetes nodes **MUST** be located in the same `Folder`.
For more details about folders - refer to official [documentation](https://cloud.yandex.ru/docs/resource-manager/concepts/resources-hierarchy)
* Kubernetes node names **MUST** match the VM name.
By default, the `kubelet` will name nodes based on the node hostname. On Yandex.Cloud, node hostname is set based on the VM name.
So, it is important that the node name on Kubernetes matches corresponding VM name, otherwise CCM will not be able to find corresponding cloud resources.
#### Cluster configuration
* `kubelet` **MUST** run with `--cloud-provider=external`.
This is to ensure that the `kubelet` is aware that it must be initialized by the CCM before it is scheduled any work.
* `kube-apiserver` and `kube-controller-manager` **MUST NOT** set the flag `--cloud-provider` which will default them to use no cloud provider natively.
**WARNING**: setting `--cloud-provider=external` will taint all nodes in a cluster with `node.cloudprovider.kubernetes.io/uninitialized`.
It is the responsibility of CCM to untaint those nodes once it has finished initializing them.
This means that most pods will be left unschedulable until the CCM is running.
### Deployment
#### Authentication and Configuration
The `yandex-cloud-controller-manager` requires a API Access Token and the Folder ID stored in the following environment variables:
* `YANDEX_CLOUD_ACCESS_TOKEN`
* `YANDEX_CLOUD_FOLDER_ID`
The default manifest is configured to set these environment variables from a secret named `yandex-cloud`:
```bash
$ cat <