qingcloud-cloud-controller-manager

module
v1.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 16, 2019 License: Apache-2.0

README

如何手动部署 qingcloud 负载均衡器插件

appcenter中的k8s集群都已自动配置,无需手动安装

  1. 修改所有节点的kubelet 配置参数,添加参数 KUBE_CLOUD_PROVIDER="--cloud-provider=external",参考
  2. 如果主机的名称(hostname)已经被修改(默认都是instance_id),不在是instance_id,需要在各个节点上包括master执行下面的命令
instance_id=`cat /etc/qingcloud/instance-id`
kubectl annotate nodes {nodename} "node.beta.kubernetes.io/instance-id=${instance_id}" ##请替换nodename
  1. master节点生成配置文件。下面展示了配置文件的样子,用户需要手动添加这些文件,并且去掉注释。
    • cat /etc/kubernetes/qingcloud.conf 此文件是cloud-controller的配置文件,文件名和文件位置都不宜更改。
    [Global] 
    qyConfigPath = /etc/qingcloud/config.yaml  #青云api密钥存放的位置,必填
    zone = ap2a
    defaultVxNetForLB = vxnet-lddzg8e #lb的默认vxnet,必填
    clusterID = "mycluster" #集群名称,必填
    
    qy_access_key_id: 'QINGCLOUDACCESSKEYID'
    qy_secret_access_key: 'QINGCLOUDSECRETACCESSKEYEXAMPLE'
    zone: 'pek1'
    
  2. 安装yaml,等待安装完成即可
    kubectl apply -f https://raw.githubusercontent.com/yunify/qingcloud-cloud-controller-manager/master/deploy/kube-cloud-controller-manager.yaml
    

如何使用 qingcloud 负载均衡器插件

请参考青云官方用户手册,为 service 定义添加合适的 annotation

A kubernetes cloud-controller-manager for the qingcloud

Directories

Path Synopsis
Package qingcloud is an implementation of Interface, LoadBalancer and Instances for QingCloud.
Package qingcloud is an implementation of Interface, LoadBalancer and Instances for QingCloud.
test

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL