How to use probes in k8s

一、Kubernetes probes三种探针 k8s存在存活(Liveness)、就绪(Readiness)和启动(Startup)三种探针,根据k8s官方的描述如下: kubelet 使用存活探针(Liveness)来确定什么时候要重启容器。 例如,存活探针可以探测到应用死锁(应用程序在运行,但是……

Continue reading

Kubeconfig示例及解析

What is a Kubeconfig file? A Kubeconfig is a YAML file with all the Kubernetes cluster details, certificate, and secret token to authenticate the cluster. You might get this config file directly from the cluster administrator or from a cloud platform if you are using managed Kubernetes cluster. Example Kubeconfig File Here is an example of a Kubeconfig. It needs the following key information to connect to the Kubernetes clusters. certificate-authority-data: Cluster CA server: Cluster endpoint (IP/DNS of master node) name: Cluster name user: name of the user/service account. token: Secret token of the user/service account. 1apiVersion: v1 2clusters: 3- cluster: 4 certificate-authority-data: <ca-data-here> 5 server: https://your-k8s-cluster.com 6 name: <cluster-name> 7contexts: 8- context: 9 cluster: <cluster-name> 10 user: <cluster-name-user> 11 name: <cluster-name> 12current-context: <cluster-name> 13kind: Config 14preferences: {} 15users: 16- name: <cluster-name-user> 17 user: 18 token: <secret-token-here> 19</secret-token-here></cluster-name-user></cluster-name></cluster-name></cluster-name-user></cluster-name></cluster-name></ca-data-here> Different Methods……

Continue reading

华为CCE安装isito实现ASM服务网格

华为云在国内上线的有商业版的服务网格产品ASM(基于isito的商业产品),不过在海外regions没有上线,刚好遇的一个项目需要在华为云CCE上使用服务网格,跟同事简单沟通了下客户需求,就手动安装了一个isito实现服务网格。 一、安装istio istio的安装配置需要使用到is……

Continue reading

华为云主机 Auto Scaling 配置测试

华为云 Auto Scaling 服务可根据用户的业务需求和预设策略定时、周期、动态(根据CPU、内存等使用率),这里在一台测试服务上通过安装 web 应用,能过php运行斐波那契数列计算,模拟CPU高资源利用率场景。 一、测试环境和代码 使用的测试OS是Centos 8.2,测试主机使用的是2C 4G的虚拟机,web……

Continue reading

huaweicloud监控服务CES、AOM、APM

华为云监控相关服务 华为云和性能监控相关的服务有三种,如下: Application Operations Management (AOM 应用运维管理) Application Performance Management (APM 应用性能管理) Cloud Eye(CES 云监控) AOM 与 APM的区别 apm-aom AOM和APM都是和应用相关的,APM偏向于应用之间的链路拓扑、调用链分析等,对应的开源软件有Zipkin,Pinpoint,SkyWa……

Continue reading

docker安装gitlab

gitlab-ce开源版docker安装 1mkdir /srv/gitlab 2export GITLAB_HOME=/srv/gitlab 3 4docker run --detach \ 5 --hostname gitlab.example.com \ 6 --publish 443:443 --publish 80:80 --publish 2022:22 \ 7 --name gitlab \ 8 --restart always \ 9 --volume $GITLAB_HOME/config:/etc/gitlab \ 10 --volume $GITLAB_HOME/logs:/var/log/gitlab \ 11 --volume $GITLAB_HOME/data:/var/opt/gitlab \ 12 --shm-size 256m \ 13 gitlab/gitlab-ce:latest 修改hosts文件,并通过域名访问 修改C:\Windows\System32\drivers\etc\hosts 指向 110.238.84.8 gitlab.example.com 访问http://gitl……

Continue reading

K8S HPA扩缩容灵敏度

K8S 1.18 迎来了一次更新,在之前 v2beta2 版本上新增了HPA扩缩容灵敏度的控制,不过版本号依然保持 v2beta2 不变。这次更新实际就是在 HPA Spec 下新增了一个 behavior 字段,下面有 scaleUp 和 scaleDown 两个字段分别控制扩容和缩容的行为,具体可参考 官方 API 文档。其主要可以用于以下场景: 对于有流量突发的关键业务,在需要的时候应该快速扩容 (即……

Continue reading

K8S中使用自定义指标进行HPA扩缩容

k8s的默认扩缩容使用的是metrics-server来实现的,一般自指义指标(custom HPA)通过prometheus和prometheus-adapter来实现的。Prometheus 用于监控应用的负载和集群本身的各种指标,Prometheus Adapter 可以帮我们使用 Prometheus 收集的指标……

Continue reading

解决Docker报错Failed D-Bus: Operation not permitted

在centos docker image里,通过systemctl start httpd这样的指令启动服务,经常会遇到Failed to get D-Bus connection: Operation not permitted这样的报错,这里就结合示例,给出下解决方法。 d-bus-permitted 方法1:前台启用 1[root@ecs-82f5]~# docker run -itd centos:7 2c7b7404702322146e9c53a2fafb89dd4dd2dc7d3996dd4c7d62c9c14dff44961 3[root@ecs-82f5]~# docker ps 4CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 5c7b740470232 centos:7 "/bin/bash" 3 seconds ago Up 2 seconds wizardly_kare 6[root@ecs-82f5]~# docker exec -it c7b740470232 /bin/bash 7或者docke……

Continue reading

Latest articles

Categories

Tags

ACL AD AES AI Alpine Android Anpic Ansible Apache Apm Apparmor Appfog Apr Apt-Get Aria2 Array Atlassian Atop Audit Awk AWS Awstats Axel Azure Backdoor Backup Bamboo Bash Bat Benchmark Bigdata Bin Bind Bitwise Blockchain BMC Book Bootstrap Brocade Bsd C1000 Cache Capistrano Catlog CDH5 Centos Centos7 Chatops Chattr Check_mk Checkinstall Cisco CL210 Clickhouse Cloud Cloud-Desktop Cmdb Cms Cobbler Collectd Comm Compress Confd Conver Corosync Cpu Crontab Crunchbang Css Curl C语言 Date DDOS Decode Dell Desktop Devops Df Dhcp Diff Diskpart DISTINCT Django DNS Docker Dos2unix Dpkg Drupal Duckdb EKS ELK Etcd Excel Fail2ban Fastcgi Fdisk Fiddler Find Firewalld Flask Flvtool Ftp Function Fuser GCP Geek Ghost Gin Git Github Gitlab Glances Glusterfs Go Godaddy Golang Google Gooupadd Grafana Graphviz Gravatra Grep Grub2 Hadoop Haproxy Hardware HBA HCIE Heartbeat Helm Hexdump Hhvm History Hotspot Html Http/Html/Web Http/Html/Web Httplogs Https HttpWatch Huawei Huaweicloud Hugo IBM Icmp Iconv Ifconfig IIS InfluxDB Ingress InnoDB Inotify Iopp IOS Ipmitool Iptables Iredmail Iscsi Isito It-News Java JavaScript Jdk Jenkins Jinja2 Jira Join Joomla K3s K8s Kdump Keepalived Kernel Kingate KVM Lamp Last Leetcode Lib Linux Linux高级篇 Ln Ls Lsi Lsof Lvm Lvs Mac Mail Man Mark Markdown Matplotlib Maven Memcached Microservice Mimikatz Mkdocs Mkpasswd Mmonit Mod_jk Mongodb Monit Monitor Mono Moodle Mosh Mount Mplayer Mpm Mrtg Mtr My.cnf Mysql Mysqlbinlog Mysqld_multi MySQLdb Mysqldump Mysqlhotcopy Nagios Nc Nethogs Netlify Nexus Nfs Nginx Nmon Nocatlog Node.js Nrpe Ntfs Ntop Ntp Obs Ocr Open-Falcon Openbox Opencv Openldap OpenResty Openssl Openstack Oracle Oswatch Paas Pacemaker Pam Pandas Parted Pcp Pcre Pdf Percona Perl Pexpect Pgrep Php Php-Fpm Ping Plsql Develope PM Postfix PostgreSQL Powershell Prettify Proc Prometheus Puppeteer Pushd Pwgen Pxe Pyecharts Python Python模块 QoS Radmin Raid Rdesktop Read Redhat Redis Redmine Regex Rh134 RH318 RH442 RHCA RHCE Rhel7 Rhel8 RHEV Rm Rman Rootkit Route Rpm Rpmforge Rrdtool RSA Rsync Rsyslog Safe Saltstack Samba Scapy Screen SecureCRT Sed Selenium Selinux Seo Seq Session Set Shc Sheepdog Shell Shopt Sitemap Skydns Smokeping Snffier Snmp Socket Soft Sort Spider Sql Sqlserver Squid SRE Ss Ssh Sshpass Statuscode Strace Strings Su SublimeText2 Sudo Suse Svn Sysbench Syslog-Ng Sysstat Systemd T Tar TC Tcpcopy Tcpdump Tech Telecom Telnet Tencentcloud Tengine Test Testlink Threads Time Tmux Tomcat Touch Tr Tsar Twisted Ubuntu Udev Ulimit Unix Unixbench User-Agent Useradd Varnish VBA Vbs Vercel Vi Vim Visudo Vmstat Vmware Vnc Voice Vpn Vscode Vsftp Vsftpd Vue Watchdog Web Webcam Webistrano Wget Wiki Windows Wol Wordpress Workshop Wsl X-Windows Xampp Xcache Xmllint Xtrabackup Yule Yum Zabbix Zeromq Zip Zonetime Zookeeper 下载工具 云主机 云原生 代理 加密 古意 吐槽 圈里圈外 娱乐 字符串函数 安全 平台架构 推理 提权 故事汇 故障案例 数据结构 每日看点 民国史 生活 科学记录 站长管理工具 算法 管理 网站架构 翻墙 股票 行业 诗韵 负载均衡 远程管理 面试题

Links

Meta