# This is an example of how to setup cloud-controller-manger as a Daemonset in your cluster.# It assumes that your masters can run pods and has the role node-role.kubernetes.io/master# Note that this Daemonset will not work straight out of the box for your cloud, this is# meant to be a guideline.---apiVersion:v1kind:ServiceAccountmetadata:name:cloud-controller-managernamespace:kube-system---kind:ClusterRoleBindingapiVersion:rbac.authorization.k8s.io/v1metadata:name:system:cloud-controller-managerroleRef:apiGroup:rbac.authorization.k8s.iokind:ClusterRolename:cluster-adminsubjects:-kind:ServiceAccountname:cloud-controller-managernamespace:kube-system---apiVersion:apps/v1kind:DaemonSetmetadata:labels:k8s-app:cloud-controller-managername:cloud-controller-managernamespace:kube-systemspec:selector:matchLabels:k8s-app:cloud-controller-managertemplate:metadata:labels:k8s-app:cloud-controller-managerspec:serviceAccountName:cloud-controller-managercontainers:-name:cloud-controller-manager# for in-tree providers we use k8s.gcr.io/cloud-controller-manager# this can be replaced with any other image for out-of-tree providersimage:k8s.gcr.io/cloud-controller-manager:v1.8.0command:-/usr/local/bin/cloud-controller-manager---cloud-provider=<YOUR_CLOUD_PROVIDER> # Add your own cloud provider here!---leader-elect=true---use-service-account-credentials# these flags will vary for every cloud provider---allocate-node-cidrs=true---configure-cloud-routes=true---cluster-cidr=172.17.0.0/16tolerations:# this is required so CCM can bootstrap itself-key:node.cloudprovider.kubernetes.io/uninitializedvalue:"true"effect:NoSchedule# this is to have the daemonset runnable on master nodes# the taint may vary depending on your cluster setup-key:node-role.kubernetes.io/mastereffect:NoSchedule# this is to restrict CCM to only run on master nodes# the node selector may vary depending on your cluster setupnodeSelector:node-role.kubernetes.io/master:""
Thanks for the feedback. If you have a specific, answerable question about how to use Kubernetes, ask it on
Stack Overflow.
Open an issue in the GitHub repo if you want to
問題を報告する
or
改善を提案.