Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 22 for kubeConfigPath (1.34 sec)

  1. pkg/kubelet/certificate/bootstrap/bootstrap.go

    // should stop immediately.
    func isClientConfigStillValid(kubeconfigPath string) (bool, error) {
    	_, err := os.Stat(kubeconfigPath)
    	if os.IsNotExist(err) {
    		return false, nil
    	}
    	if err != nil {
    		return false, fmt.Errorf("error reading existing bootstrap kubeconfig %s: %v", kubeconfigPath, err)
    	}
    	bootstrapClientConfig, err := loadRESTClientConfig(kubeconfigPath)
    	if err != nil {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Dec 27 08:04:25 UTC 2022
    - 14.2K bytes
    - Viewed (0)
  2. cmd/kubeadm/app/cmd/upgrade/node.go

    	if _, err := os.Stat(filepath); os.IsNotExist(err) {
    		isControlPlaneNode = false
    	}
    	if len(nodeOptions.kubeConfigPath) == 0 {
    		// Update the kubeconfig path depending on whether this is a control plane node or not.
    		nodeOptions.kubeConfigPath = constants.GetKubeletKubeConfigPath()
    		if isControlPlaneNode {
    			nodeOptions.kubeConfigPath = constants.GetAdminKubeConfigPath()
    		}
    	}
    
    	externalCfg := &v1beta4.UpgradeConfiguration{}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu May 16 08:34:39 UTC 2024
    - 10K bytes
    - Viewed (0)
  3. cmd/kubeadm/app/cmd/reset.go

    		SkipCRIDetect:     opts.skipCRIDetect,
    	})
    	if err != nil {
    		return nil, err
    	}
    
    	client, err := cmdutil.GetClientSet(opts.kubeconfigPath, false)
    	if err == nil {
    		klog.V(1).Infof("[reset] Loaded client set from kubeconfig file: %s", opts.kubeconfigPath)
    		initCfg, err = configutil.FetchInitConfigurationFromCluster(client, nil, "reset", false, false)
    		if err != nil {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Oct 17 12:26:58 UTC 2023
    - 11.4K bytes
    - Viewed (0)
  4. cmd/kubeadm/app/cmd/init.go

    	if d.dryRun {
    		return d.dryRunDir
    	}
    	return d.kubeconfigDir
    }
    
    // KubeConfigPath returns the path to the kubeconfig file to use for connecting to Kubernetes
    func (d *initData) KubeConfigPath() string {
    	if d.dryRun {
    		d.kubeconfigPath = filepath.Join(d.dryRunDir, kubeadmconstants.AdminKubeConfigFileName)
    	}
    	return d.kubeconfigPath
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jan 17 03:37:05 UTC 2024
    - 24.1K bytes
    - Viewed (0)
  5. pkg/kubelet/certificate/bootstrap/bootstrap_test.go

    	}
    
    	tests := []struct {
    		name                 string
    		kubeconfigPath       string
    		bootstrapPath        string
    		certDir              string
    		expectedCertConfig   *restclient.Config
    		expectedClientConfig *restclient.Config
    	}{
    		{
    			name:           "bootstrapPath is empty",
    			kubeconfigPath: filevalid.Name(),
    			bootstrapPath:  "",
    			certDir:        dir,
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue May 09 14:24:11 UTC 2023
    - 13K bytes
    - Viewed (0)
  6. cmd/kubemark/app/hollow_node.go

    }
    
    func (c *hollowNodeConfig) createClientConfigFromFile() (*restclient.Config, error) {
    	clientConfig, err := clientcmd.LoadFromFile(c.KubeconfigPath)
    	if err != nil {
    		return nil, fmt.Errorf("error while loading kubeconfig from file %v: %v", c.KubeconfigPath, err)
    	}
    	config, err := clientcmd.NewDefaultClientConfig(*clientConfig, &clientcmd.ConfigOverrides{}).ClientConfig()
    	if err != nil {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue May 14 08:58:18 UTC 2024
    - 11K bytes
    - Viewed (0)
  7. cmd/kubeadm/app/cmd/init_test.go

    		if r.Method != http.MethodHead {
    			w.WriteHeader(http.StatusMethodNotAllowed)
    		}
    	}))
    	defer ts.Close()
    
    	kubeconfigPath := filepath.Join(t.TempDir(), "custom.conf")
    	if err := os.WriteFile(kubeconfigPath, []byte(fmt.Sprintf(testKubeconfigDataFormat, ts.URL)), 0o600); err != nil {
    		t.Fatalf("os.WriteFile returned unexpected error: %v", err)
    	}
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Jan 19 12:26:20 UTC 2024
    - 11.9K bytes
    - Viewed (0)
  8. cmd/kubeadm/app/cmd/certs.go

    type expirationFlags struct {
    	cfgPath        string
    	kubeconfigPath string
    	cfg            kubeadmapiv1.ClusterConfiguration
    }
    
    func addExpirationFlags(cmd *cobra.Command, flags *expirationFlags) {
    	options.AddConfigFlag(cmd.Flags(), &flags.cfgPath)
    	options.AddCertificateDirFlag(cmd.Flags(), &flags.cfg.CertificatesDir)
    	options.AddKubeConfigFlag(cmd.Flags(), &flags.kubeconfigPath)
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 01 16:01:49 UTC 2024
    - 19.4K bytes
    - Viewed (0)
  9. cmd/kubeadm/app/phases/kubeconfig/kubeconfig.go

    		return errors.Errorf("%s: spec was nil", errInvalid)
    	}
    	kubeConfigPath := filepath.Join(kubeConfigDir, name)
    	if _, err := os.Stat(kubeConfigPath); err == nil {
    		return errors.Errorf("%s: kube config: %s", errExist, kubeConfigPath)
    	} else if !os.IsNotExist(err) {
    		return errors.Wrapf(err, "unexpected error while checking if file exists: %s", kubeConfigPath)
    	}
    	if pkiutil.CSROrKeyExist(kubeConfigDir, name) {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Jun 07 17:04:18 UTC 2024
    - 27K bytes
    - Viewed (0)
  10. cmd/kubeadm/app/cmd/join.go

    		* The Kubernetes control plane instances scaled up.
    		{{.etcdMessage}}
    
    		To start administering your cluster from this node, you need to run the following as a regular user:
    
    			mkdir -p $HOME/.kube
    			sudo cp -i {{.KubeConfigPath}} $HOME/.kube/config
    			sudo chown $(id -u):$(id -g) $HOME/.kube/config
    
    		Run 'kubectl get nodes' to see this node join the cluster.
    
    		`)))
    
    	joinLongDescription = dedent.Dedent(`
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Feb 16 15:33:38 UTC 2024
    - 25.2K bytes
    - Viewed (0)
Back to top