Providing kubeconfig file is now the switch for standalone mode
Replaces use of --api-servers with --kubeconfig in Kubelet args across the turnup scripts. In many cases this involves generating a kubeconfig file for the Kubelet and placing it in the correct location on the node.
This commit is contained in:
@@ -189,7 +189,7 @@ func (kl *Kubelet) GetRuntime() kubecontainer.Runtime {
|
||||
|
||||
// GetNode returns the node info for the configured node name of this Kubelet.
|
||||
func (kl *Kubelet) GetNode() (*v1.Node, error) {
|
||||
if kl.standaloneMode {
|
||||
if kl.kubeClient == nil {
|
||||
return kl.initialNode()
|
||||
}
|
||||
return kl.nodeInfo.GetNodeInfo(string(kl.nodeName))
|
||||
@@ -201,7 +201,7 @@ func (kl *Kubelet) GetNode() (*v1.Node, error) {
|
||||
// in which case return a manufactured nodeInfo representing a node with no pods,
|
||||
// zero capacity, and the default labels.
|
||||
func (kl *Kubelet) getNodeAnyWay() (*v1.Node, error) {
|
||||
if !kl.standaloneMode {
|
||||
if kl.kubeClient != nil {
|
||||
if n, err := kl.nodeInfo.GetNodeInfo(string(kl.nodeName)); err == nil {
|
||||
return n, nil
|
||||
}
|
||||
|
Reference in New Issue
Block a user