首页 > 其他分享 >k8s:配置启动参数时,一个小小的技巧提示:参数是可以多次指定的,以最后指定的为准

k8s:配置启动参数时,一个小小的技巧提示:参数是可以多次指定的,以最后指定的为准

时间:2022-11-21 09:35:50浏览次数:57  
标签:01 -- 指定 192.168 参数 6443 https go k8s

参数是可以多次指定的,以【最后】指定的为准!

参数是可以多次指定的,以【最后】指定的为准!

参数是可以多次指定的,以【最后】指定的为准!

 

 

例子:多次指定同一个参数,最后的配置项是正确的

kube-scheduler \
  --kubeconfig=/root/tls/kubeconfig.yaml \
  --master=https://192.168.208.200:6443 \
  --master=https://192.168.208.201:6443 \
  --master=https://192.168.208.202:6443 \
  --master=https://192.168.208.203:6443 \
A203:~# kube-scheduler \
>   --kubeconfig=/root/tls/kubeconfig.yaml \
>   --master=https://192.168.208.200:6443 \
>   --master=https://192.168.208.201:6443 \
>   --master=https://192.168.208.202:6443 \
>   --master=https://192.168.208.203:6443 \
> 
I1121 01:27:15.031043   57473 serving.go:348] Generated self-signed cert in-memory
W1121 01:27:15.456518   57473 authentication.go:317] No authentication-kubeconfig provided in order to lookup client-ca-file in configmap/extension-apiserver-authentication in kube-system, so client certificate authentication won't work.
W1121 01:27:15.456570   57473 authentication.go:341] No authentication-kubeconfig provided in order to lookup requestheader-client-ca-file in configmap/extension-apiserver-authentication in kube-system, so request-header client certificate authentication won't work.
W1121 01:27:15.456877   57473 authorization.go:194] No authorization-kubeconfig provided, so SubjectAccessReview of authorization tokens won't work.
I1121 01:27:15.469809   57473 server.go:148] "Starting Kubernetes Scheduler" version="v1.25.3"
I1121 01:27:15.469853   57473 server.go:150] "Golang settings" GOGC="" GOMAXPROCS="" GOTRACEBACK=""
I1121 01:27:15.471114   57473 secure_serving.go:210] Serving securely on [::]:10259
I1121 01:27:15.472360   57473 tlsconfig.go:240] "Starting DynamicServingCertificateController"
I1121 01:27:15.571629   57473 leaderelection.go:248] attempting to acquire leader lease kube-system/kube-scheduler...
I1121 01:27:15.575434   57473 leaderelection.go:258] successfully acquired lease kube-system/kube-scheduler
... ...

 

 

例子:多次指定同一个参数,最后的配置项是错误的

kube-scheduler \
  --kubeconfig=/root/tls/kubeconfig.yaml \
  --master=https://192.168.208.200:6443 \
  --master=https://192.168.208.202:6443 \
  --master=https://192.168.208.203:6443 \
  --master=https://192.168.208.201:6443 \
A203:~# kube-scheduler \
>   --kubeconfig=/root/tls/kubeconfig.yaml \
>   --master=https://192.168.208.200:6443 \
>   --master=https://192.168.208.202:6443 \
>   --master=https://192.168.208.203:6443 \
>   --master=https://192.168.208.201:6443 \
> 
I1121 01:22:47.276411   57410 serving.go:348] Generated self-signed cert in-memory
W1121 01:22:47.668727   57410 authentication.go:317] No authentication-kubeconfig provided in order to lookup client-ca-file in configmap/extension-apiserver-authentication in kube-system, so client certificate authentication won't work.
W1121 01:22:47.668767   57410 authentication.go:341] No authentication-kubeconfig provided in order to lookup requestheader-client-ca-file in configmap/extension-apiserver-authentication in kube-system, so request-header client certificate authentication won't work.
W1121 01:22:47.668810   57410 authorization.go:194] No authorization-kubeconfig provided, so SubjectAccessReview of authorization tokens won't work.
I1121 01:22:47.674452   57410 server.go:148] "Starting Kubernetes Scheduler" version="v1.25.3"
I1121 01:22:47.674491   57410 server.go:150] "Golang settings" GOGC="" GOMAXPROCS="" GOTRACEBACK=""
I1121 01:22:47.675703   57410 secure_serving.go:210] Serving securely on [::]:10259
I1121 01:22:47.675802   57410 tlsconfig.go:240] "Starting DynamicServingCertificateController"
W1121 01:22:47.676669   57410 reflector.go:424] vendor/k8s.io/client-go/informers/factory.go:134: failed to list *v1.CSINode: Get "https://192.168.208.201:6443/apis/storage.k8s.io/v1/csinodes?limit=500&resourceVersion=0": dial tcp 192.168.208.201:6443: connect: connection refused
E1121 01:22:47.676836   57410 reflector.go:140] vendor/k8s.io/client-go/informers/factory.go:134: Failed to watch *v1.CSINode: failed to list *v1.CSINode: Get "https://192.168.208.201:6443/apis/storage.k8s.io/v1/csinodes?limit=500&resourceVersion=0": dial tcp 192.168.208.201:6443: connect: connection refused
... ...

 

标签:01,--,指定,192.168,参数,6443,https,go,k8s
From: https://www.cnblogs.com/jinzhenshui/p/16910333.html

相关文章

  • Ubuntu22.04 安装 K8S
    一、环境软件版本:服务版本操作系统ubuntuserver22.04LTS容器运行时​​containerd.io​​1.6.8-1k8s1.24.5网络插件calico3.24.1节点说明:k8s集群角色IP主机名安装组件......
  • k8S资源管理
    资源管理资源管理介绍在kubernetes中,所有的内容都抽象为资源,用户需要通过操作资源来管理kubernetes。kubernetes的本质上就是一个集群系统,用户可以在集群中部署各种......
  • maven 打包指定 mainclass
    pom文件添加<build><plugins><plugin><artifactId>maven-assembly-plugin</artifactId><configuration>......
  • k8s健康状态----监控与日志
    一、背景监控和日志是大型分布式系统的重要基础设施,监控可以帮助开发者查看系统的运行状态,而日志可以协助问题的排查和诊断。在Kubernetes中,监控和日志属于生态的一部......
  • DES和AES加密:指定键的大小对于此算法无效
    “System.ArgumentException”类型的未经处理的异常在mscorlib.dll中发生其他信息:指定键的大小对于此算法无效。在看DES和AES加密的时候,找了个加密的Demo,自己试验的时......
  • 部署k8s集群的超详细实践步骤
    k8s是一个可移植的、可扩展的开源平台,用于管理容器化的工作负载和服务,可以促进声明式配置和自动化,下面这篇文章主要给大家介绍了关于部署k8s集群的实践步骤,文中通过图......
  • 在新建FileInputStream时使用当前相对路径或者绝对路径作为参数的问题
    当new一个FileInputStream时,想使用相对路径这样无论我的服务端部署到哪里,都可以一直用一个文件夹而不必修改程序的路径代码,当然首先我用的绝对路径来做实验,......
  • K8s---【KubeSphere部署nacos集群】
    KubeSphere部署nacos集群1.准备nacos配置文件下载地址:https://github.com/alibaba/nacos/releases/tag/2.0.3注意:下载的是nacos-server-2.0.3.zip,而不是nacos。解压后......
  • k8s源码分析3-kubectl命令行设置7大命令分组
    本节重点总结:设置cmd工厂函数f,主要是封装了与kube-apiserver交互客户端用cmd工厂函数f创建7大分组命令,如下基础初级命令BasicCommands(Beginner):基础中级命......
  • Unittest(9):unittest的第三方库paramunittest参数化基础及应用
    一、unittest参数化介绍参数化测试用于当需要使用多组不同的测试数据测试同一个方法的时候paramunittest是unittest实现参数化的一个专门的模块,可以传入多组参数,自动生成......