https://blog.csdn.net/fy573060627/article/details/52872740

.linux 访问 https 证书问题

[root@kube-node2 ~]# curl https://192.168.0.200:8443
curl: () Peer's Certificate issuer is not recognized.
More details here: http://curl.haxx.se/docs/sslcerts.html curl performs SSL certificate verification by default, using a "bundle"
of Certificate Authority (CA) public keys (CA certs). If the default
bundle file isn't adequate, you can specify an alternate file
using the --cacert option.
If this HTTPS server uses a certificate signed by a CA represented in
the bundle, the certificate verification probably failed due to a
problem with the certificate (it might be expired, or the name might
not match the domain name in the URL).
If you'd like to turn off curl's verification of the certificate, use
the -k (or --insecure) option. .现有 证书twca.cer 需要添加到 linux 证书信任列表 转换格式 .cer 到 .pem
openssl x509 -inform der -in twca.cer -out twca.pem #追加到信任列表
cat twca.pem >> /etc/pki/tls/certs/ca-bundle.crt [root@kube-node2 k8s]# cd /etc/kubernetes/cert/
[root@kube-node2 cert]# ls
ca-config.json kube-controller-manager-key.pem kubelet-client-current.pem kubernetes-key.pem metrics-server.pem
ca-key.pem kube-controller-manager.pem kubelet.crt kubernetes.pem
ca.pem kubelet-client------.pem kubelet.key metrics-server-key.pem
[root@kube-node2 cert]# cat ca.pem >> /etc/pki/tls/certs/ca-bundle.crt
[root@kube-node2 cert]# cat ca-key.pem >> /etc/pki/tls/certs/ca-bundle.crt .添加后访问就不会出现上面错误, [root@kube-node2 cert]# curl https://192.168.0.200:8443
{
"kind": "Status",
"apiVersion": "v1",
"metadata": { },
"status": "Failure",
"message": "Unauthorized",
"reason": "Unauthorized",
"code":
}[root@kube-node2 cert]#

linux系统导入证书的更多相关文章

  1. linux系统上Mysql数据库导入导出操作

    需求:把MySQL数据库目录中的dz数据库备份到/home/dz_bak.sql ,然后再新建一个数据库dzbak,最后把/home/dz_bak.sql 导入到数据库dzbak中.操作如下:以下操作 ...

  2. linux系统下使用nginx反向代理asp.net core,并配置免费的https证书

    反向代理是为动态 Web 应用提供服务的常见设置. 反向代理终止 HTTP 请求,并将其转发到 ASP.NET Core 应用. 1.在asp.net core项目中的Startup的Configur ...

  3. Linux下导入CA证书

    在部署路由器的时候,发现路由器不支持从https安装应用,经过调查,发现是路由器里面没导入证书 安装ca-certificates即可解决. opkg install ca-certificates

  4. Linux系统VPS主机SSH常用命令

    putty查询log文当里的"test"关键字 /home/iotserver/WebServer3_log# grep "test" log.log.bak2 ...

  5. LINUX系统学习以及初学者系统下载

    Linux系统常用命令大全 来源:服务器之家 [博客中所有文章如有不对的地方希望看官们指出,有问题也可以提出来相互交流,相互学习,感谢大家!] 初学者建议安装:sentOS Ubuntu系统下载连接h ...

  6. Linux 系统常用管理命令(精简笔记)

    Linux是一套免费使用和自由传播的类Unix操作系统,下面的笔记是我从鸟菜中摘抄出来的重要命令,并进行了一定的排版,摒弃了一些用不到的乱七八糟的命令,目的是在生产环境中能够快速的定位并查询需要命令的 ...

  7. javax.net.ssl.SSLHandshakeException(Cas导入证书)

    一.报错: javax.net.ssl.SSLHandshakeException二.原因分析:CAS部署时,常常要涉及到HTTPS的证书发布问题.由于在实验环境中,CAS和应用服务常常是共用一台PC ...

  8. 新手要想学好Linux系统就必须做好这四件事情

    一般情况下,大部分人接触Linux的机会并不多,对Linux平台下的开发更是一无所知.而现在的发展趋势却越来越表明:无论是作为一个优秀的软件开发人员,或是互联网.IT行业的从业人员,掌握Linux是一 ...

  9. linux系统下的软连接与硬链接

    前几天在linux系统下安装mongoDB,然后运行脚本导入数据的时候遇到了链接库查询不到的情况,如图 1所示.当时是通过创建软连接的方式解决的这个问题.虽然,通过网上的教程解决了这个问题,但是对于软 ...

随机推荐

  1. xss技巧记录

    1.iframe的srcdoc属性 先演示一下 <iframe srcdoc="<script>alert(1)</script>"> 浏览器渲 ...

  2. PHP+redis消息队列抢购实现

    实现功能: 1. 基于redis队列,防止高并发的超卖 2. 基于mysql的事务加排它锁,防止高并发的超卖 基于redis队列工作流程: 1. 管理员根据goods表中的库存,创建redis商品库存 ...

  3. solr创建core

    创建Core的两种方法: 第一种方法: 1.打开dos命令窗口,切换目录到${solr.home}\bin,然后输入:solr create -c corename之后回车: 2.打开solr安装文件 ...

  4. iptables内网访问外网 ε=ε=ε=(~ ̄▽ ̄)~

    介绍 iptables概述: netfilter/iptables : IP信息包过滤系统,它实际上由两个组件netfilter 和 iptables 组成. netfilter/iptables 关 ...

  5. vue cli3.0快速搭建项目详解(强烈推荐)

    这篇文章主要介绍下vue-cli3.0项目搭建,项目结构和配置等整理一下,分享给大家. 一.介绍 Vue CLI 是一个基于 Vue.js 进行快速开发的完整系统.有三个组件: CLI:@vue/cl ...

  6. Struts2基本原理【转】

    阐述struts2的执行流程. Struts 2框架本身大致可以分为3个部分:核心控制器FilterDispatcher.业务控制器Action和用户实现的企业业务逻辑组件. 核心控制器FilterD ...

  7. vue 中监听窗口发生变化,触发监听事件, window.onresize && window.addEventListener('resize',fn) ,window.onresize无效的处理方式

    // 开始这样写,不执行 window.onresize = function() { console.log('窗口发生变化') } // 改成window监听事件 window.addEventL ...

  8. React-native 环境配置及项目创建

    https://reactnative.cn/docs/next/getting-started.html 看到  安装 Android Studio 安装 Android Studio http:/ ...

  9. LOJ #6145. 「2017 山东三轮集训 Day7」Easy 点分树+线段树

    这个就比较简单了~ Code: #include <cstdio> #include <algorithm> #define N 100004 #define inf 1000 ...

  10. CF1205C Palindromic Paths

    题目链接 问题分析 首先可以想到,坐标和为奇数的位置可以被唯一确定.同样的,如果假定\((1,2)\)是\(0\),那么坐标和为偶数的位置也可以被唯一确定.这样总共使用了\(n^2-3\)次询问. 那 ...