摘要: File "/usr/bin/yum-config-manager", line 135 except yum.Errors.RepoError, e: ^SyntaxError: invalid syntax vim /usr/bin/yum-config-manager #!/usr/bin/p 阅读全文
posted @ 2021-03-17 16:09 niubihahadewo 阅读(714) 评论(0) 推荐(0) 编辑
摘要: 一.安装jenkins 下载地址:https://www.jenkins.io/zh/download/ 建议直接下载war包 运行命令 nohup java -jar jenkins.war --httpPort=8080 & 打开浏览器进入链接 http://localhost:8080. 启动 阅读全文
posted @ 2021-03-10 21:30 niubihahadewo 阅读(397) 评论(0) 推荐(0) 编辑
摘要: 查看k8s内全部容器信息 kubectl get po -A -owide 查看k8s某个命名空间信息 kubectl get po -n 命名空间名称 -owide 容器创建过程用 kubectl describe po 容器名称 -n 命名空间名称 容器创建完用 kubectl logs -f 阅读全文
posted @ 2021-03-10 21:14 niubihahadewo 阅读(80) 评论(0) 推荐(0) 编辑
摘要: 因为跨域问题,所以变成了OPTIONS请求, 因为我的架构用了nginx代理,所以只要配置头部允许跨域,还有POST方法如果参数传的有问题也会这种情况,不能直接传一个对象,需要JSON.stringify,转下类型 location /api/ { if ($request_method ~* "( 阅读全文
posted @ 2020-10-16 00:46 niubihahadewo 阅读(898) 评论(0) 推荐(0) 编辑
摘要: passwords = dict(conn_pass=pwd, become_pass=pwd) conn_pass 连接的时候需要的密码 become_pass 提升权限需要的密码 默认走ssh用官方默认的 passwords = dict(vault_pass='secret') 需要安装ssh 阅读全文
posted @ 2020-10-14 23:48 niubihahadewo 阅读(182) 评论(0) 推荐(0) 编辑
摘要: 这个是官方提供的例子:https://docs.ansible.com/ansible/latest/dev_guide/developing_api.html中文解析可以参考:https://yangjinheng.github.io/2017/03/20/Linux/Ansible/从例子主要关 阅读全文
posted @ 2020-10-11 21:32 niubihahadewo 阅读(191) 评论(0) 推荐(0) 编辑
摘要: 版本低于5.1, Pythonimport yamlyaml.__version__ 按顺序执行查看版本,然后升级把。 阅读全文
posted @ 2020-09-02 17:19 niubihahadewo 阅读(504) 评论(0) 推荐(0) 编辑
摘要: nohup ./xxxx >/dev/null 2>&1 & 后台执行,亲测有效,要不要就要写systemd管理。目前就找到这两种办法。 阅读全文
posted @ 2020-08-18 15:47 niubihahadewo 阅读(298) 评论(0) 推荐(0) 编辑
摘要: kubelet证书过期 kubeadm token list查看一下token,如果没有就重新生成 阅读全文
posted @ 2020-06-22 15:44 niubihahadewo 阅读(1987) 评论(0) 推荐(0) 编辑
摘要: ETCDCTL_API=3现在是默认的。 etcdctl set foo bar Error: unknown command "set" for "etcdctl" 官网写了,因为新版不支持旧版API,建议换成3.3的etcd 阅读全文
posted @ 2020-06-19 21:57 niubihahadewo 阅读(1652) 评论(0) 推荐(0) 编辑