k8s坑The connection to the server localhost:8080 was refused - did you specify the right host or port
2019年01月08日 17:21:06 金柱 阅读数:47 定义一个mysql的RC文件:mysql-rc.yaml apiVersion: v1
kind: ReplicationController
metadata:
name: mysql
spec:
replicas: 1
selector:
app: mysql
template:
metadata:
labels:
app: mysql
spec:
containers:
- name: mysql
image: mysql
ports:
- containerPort: 3306
env:
- name: MYSQL_ROOT_PASSWORD
value: "123456" 发布到k8s集群中 # kubectl create -f mysql-rc.yaml 1
2 报错: The connection to the server localhost:8080 was refused - did you specify the right host or port? 1
2 没有启动k8s集群或启动顺序不对,重新按一下顺序启动所有服务: # systemctl start etcd
# systemctl start docker
# systemctl start kube-apiserver
# systemctl start kube-controller-manager
# systemctl start kube-scheduler
# systemctl start kubelet
# systemctl start kube-proxy 然后再发布mysql-rc.yaml就不报错了

k8s遇坑:The connection to the server k8s-api.virtual.local:6443 was refused - did you specify the right host or port?的更多相关文章

  1. K8s - 解决主机重启后kubelet无法自动启动问题 错误:The connection to the server 192.168.60.128:6443 was refused - did you specify the right host or port?

    1,问题描述 (1)在安装配置好 Kubernetes 后,正常情况下服务器关机重启,kubelet 也会自动启动的.但最近配置的一台服务器重启后,输入命令 kubectl get nodes 查看节 ...

  2. 【Kubernetes】The connection to the server <master>:6443 was refused - did you specify the right host or port?

    不知道怎么用着用着,使用kubectl 时报错,错误如下: root@R740--:~# kubectl get pod The connection to the server 107.105.13 ...

  3. 使用二进制方式安装K8S时使用kubectl命令报错:The connection to the server localhost:8080 was refused - did you specify the right host or port?

    解决思路: kubectl 默认从 ~/.kube/config 配置文件获取访问 kube-apiserver 地址.证书.用户名等信息,如果没有配置该文件,或者该文件个别参数配置出错,执行命令时出 ...

  4. The connection to the server localhost:8080 was refused - did you specify the right host or port?

    The connection to the server localhost:8080 was refused - did you specify the right host or port? 解决 ...

  5. k8s入坑之路(9)k8s网络插件详解

    Flannel: 最成熟.最简单的选择 Calico: 性能好.灵活性最强,目前的企业级主流 Canal: 将Flannel提供的网络层与Calico的网络策略功能集成在一起. Weave: 独有的功 ...

  6. Kubernetes-kubectl The connection to the server localhost:8080 was refused -did you specify

    今天在Kubernetes的从节点上运行命令[kubectl]出现了如下错误: [root@k8snode1 kubernetes]# kubectl get pod The connection t ...

  7. SpringCache实战遇坑

    1. SpringCache实战遇坑 1.1. pom 主要是以下两个 <dependency> <groupId>org.springframework.boot</g ...

  8. idea Connection to SQL Server - 公网8 failed java

    Connection to SQL Server - 公网8 failed java.sql.SQLException: I/O Error: SSO Failed: Native SSPI libr ...

  9. ERROR 2013 (HY000): Lost connection to MySQL server at 'reading authorization packet', system error: 0

    最近遇到一个MySQL连接的问题,远程连接MySQL时遇到"ERROR 2013 (HY000): Lost connection to MySQL server at 'reading a ...

随机推荐

  1. 在linux写一个shell脚本用maven git自动更新代码并且打包部署

    服务器上必须安装了git maven jdk 并且配置好环境变量 实际服务器中可能运行着多个Java进程,所以重新部署的时候需要先停止原来的java进程,写一个按照名称杀死进程的脚本 kill.sh ...

  2. Netfilter 之 iptable_nat

    初始化 iptable_nat_table_init函数通过调用ipt_register_table完成NAT表注册和钩子函数注册的功能:该流程与iptable_filter的函数调用的函数一致,此处 ...

  3. ArcGIS Python 获得坐标

    import arcpy infc = arcpy.GetParameterAsText(0) # Identify the geometry field # desc = arcpy.Describ ...

  4. Download google drive public shared file in terminal

    http://unix.stackexchange.com/questions/136371/how-to-download-a-folder-from-google-drive-using-term ...

  5. Flume-Replicating Channel Selector 单数据源多出口

    使用 Flume-1 监控文件变动,Flume-1 使用 Replicating Channel Selector 将变动内容传递给 Flume-2,Flume-2 负责存储到 HDFS.同时 Flu ...

  6. pytorch-VGG网络

    VGG网络结构 第一层: 3x3x3x64, 步长为1, padding=1 第二层: 3x3x64x64, 步长为1, padding=1 第三层: 3x3x64x128, 步长为1, paddin ...

  7. ajax修改表单的值后dom没更新的解决办法

    添加一个扩展方法,通过$("#id").html($("#id").formhtml())更改. 扩展方法: (function ($) { var oldHT ...

  8. hibernate关联映射之多对多

    package loaderman.c_many2many; import java.util.HashSet; import java.util.Set; /** * 开发人员 * * */ pub ...

  9. 数据分析 - pandas 模块

    数据读取结构 -  DataFrame Series (collection of values) DataFrame (collection of Series objects) Panel (co ...

  10. HAproxy负载均衡-ACL篇

    ACL定制法则: 开放策略:拒绝所有,只开放已知 拒绝策略:允许所有,只拒绝某些 事实上实现安全策略,无非也就是以上两种方法 redirect 参考:http://cbonte.github.io/h ...