随笔分类 - K8S
K8S相关文档
摘要:
##K8S-secrets拉取私有镜像 ```sh #使用docker login登录 [root@test-node1 ~]# docker login -u username -p passwd harbor.com #使用secrets-响应式 kubectl create secret -n
阅读全文

摘要:
## K8S-SidecarSet ```sh SidecarSet是Kubernetes的一个CRD(Custom Resource Definition),扩展自Deployments API Group,主要用于在Pod里注入一个或多个辅助容器(sidecar container)。 Side
阅读全文

摘要:
```sh #从pod到宿主机 kubectl -n flyby-test cp flyby-tmc-corpapi-68db975948-6fh47:/data/webapps/flyby-tmc-corpapi/logs/info.log ./info.log 从宿主机到pod kubectl
阅读全文

摘要:
```sh #先删除证书 kubectl delete secret -n h5 www.baidu.com #在用新的证书创建secret kubectl create secret tls h5.flybytrip.com --cert=7726759__baidu.com.pem --key=
阅读全文

摘要:
```sh #方法1 [root@test-master deployment]# kubectl explain deployment KIND: Deployment VERSION: apps/v1 DESCRIPTION: Deployment enables declarative upd
阅读全文

摘要:
```sh # kubectl create secret docker-registry myregistry --docker-server-私服地址--docker-usename:用护名--docker-passuont-密码--docker-email-部箱 #kubectl get se
阅读全文

摘要:
```sh [root@woker-cn-hangzhou-172-18-0-106 ]# kubectl set image deployment/flyby-hotel-channel flyby-hotel-channel=registry-vpc.cn-hangzhou.aliyuncs.c
阅读全文

摘要:
```sh 设置节点不可调度: kubectl cordon node1 驱逐节点上的pod: kubectl drain node1 --ignore-daemonsets --delete-local-data --ignore-daemonsets 如果node节点上存在daemonsets控
阅读全文

摘要:
#!/bin/bash #ENDPOINTS="https://192.168.1.207:2379,https://192.168.1.208:2379,https://192.168.1.209:2379" ENDPOINTS="127.0.0.1:2379" CACERT="/etc/kube
阅读全文

摘要:
#问题:新机器加入K8S集群报错 [kubelet-check] The HTTP call equal to ‘curl -sSL http://localhost:10248/healthz’ failed with error: Get“http://localhost:10248/healt
阅读全文

摘要:
##通过服务yaml文件配置 kind: Deployment .... spec: .... spec: hostAliases: - ip: "120.26.68.89" hostnames: - "asrexz.exiaozhi.com"
阅读全文

摘要:
[root@lecode-pre74 ~]# setenforce 0 setenforce: SELinux is disabled [root@lecode-pre74 ~]# sed -i 's/SELINUX=enforcing/SELINUX=disabled/' /etc/selinux
阅读全文

摘要:
1. zookeeper,kafka容器化 1.1 zookeeper+kafka单机docker模式 docker pull bitnami/zookeeper:3.6.3-debian-11-r46 docker pull bitnami/kafka:3.1.1-debian-11-r36 do
阅读全文

摘要:
prometheus-operator 1. Prometheus Operator介绍 介绍文章:http://t.zoukankan.com/twobrother-p-11164391.html 2016年年末,CoreOs引入了Operator 模式,并发布了Prometheus Operat
阅读全文

摘要:
创建svc资源报错显示:provided port is not in the valid range. The range of valid ports is 30000-32767 k8s集群默认端口是在30000-32767,我可以通过修改kube-apiserver来修改,apiserver
阅读全文

摘要:
``` 1.标签选择器 #给节点打上标签 [root@lecode-k8s-master deployment]# kubectl label no lecode-dev-001 hostname=lecode-dev-001 [root@lecode-k8s-master deployment]#
阅读全文

摘要:
#参考文章:https://www.cnblogs.com/zhangrui153169/p/15726165.html 当节点内存到达多少时。对节点的pod进行驱逐 [root@lecode-test-001 ~]# cat /var/lib/kubelet/kubeadm-flags.env K
阅读全文

摘要:
#开发用户没有K8S权限 [ans@master ~]$ kubectl get po Unable to connect to the server: x509: certificate signed by unknown authority (possibly because of "crypt
阅读全文

摘要:
新节点初始化 安装docker kubelet kubeadm(指定版本) #先查看当前集群docker版本 [root@lecode-k8s-master manifests]# docker version Client: Docker Engine - Community Version: 2
阅读全文

摘要:
1.安装docker-compose curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose- (uname -m)" -o /usr/local/bin/docke
阅读全文
