包含标签 k8s articles

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

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

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

如何快速创建k8s yaml文件

一、YAML Autogeneration using Kubernetes Extention One of the easiest ways to create Kubernetes YAML is using the visual studio kubernetes extension. Install the Kubernetes VS code extension, and it will help develop k8s manifests for most kubernetes objects. It also supports deploying apps to local and remote k8s clusters. All you have to do is, start typing the Object name and it will automatically populate the options for you. Then, based on your selection, it will autogenerate the basic YAML structure for you as shown n the following image. This extension supports YAML generation of Pods, Deployment, Statefulset, Replicationset, Persistent Volumes (PV), Persistent Volume Claims (PVC), etc. 二、Create YAML Manifest Using Kubectl Dry Run You can create the manifests using the kubectl imperative commands. There is a flag……

Continue reading

K8S中使用Prometheus监控nginx指标

一、环境描述 K8S中一般使用Prometheus进行指标数据的监控,而对于custom metrics自定义指标,需要满足Prometheus可以识别的格式发送。这时候一般需要写exporter来搞定自定义数据,然后上报。本篇结合nginx示例来配置下自定义指标监控。 为了省于前期复……

Continue reading

如何重启pod

A pod can also have one or more containers, one of which is the application container, and the others are the init container, which halts after it completes a job or the application container is ready to perform its function, and the sidecar container, which is affixed to the primary application container. A container or pod will not always leave due to an application failure. In scenarios like this, you will need to restart your Kubernetes Pod explicitly. In this guide, you will explore how to force pods in a deployment to restart using several ways. Pre-requisites To restart the pod using kubectl, make sure you have installed the kubectl tool along with the minikube cluster. Otherwise, you will not be able to implement the prescribed article. Methods to create pods using Kubectl To restart pods using Kubectl, you have……

Continue reading

ks8 a container name must be specified for pod报错处理

在现网的一个系统上通过kubectl logs pod名称查看日志时报错a container name must be specified for pod。出现该问题比较容易解决,一般出现该问题的都是多个container共用一个pod的情况,比如sidecar模式下,这时候查看日志的时候需要指定Pod外,还需要通过-c参数指定container。 kubectl-logs-container……

Continue reading

CCE Turbo集群升级了什么

在2021年4月25的华为HDC cloud开发者大会上,华为云发布了升级版的云容器集群CCE Turbo。其相较于CCE集群,在计算、网络和调度方面全方位加速。本篇就结合一些找到的知识点,总结下CCE Turbo相较于CCE增加了哪些技术关键点。 一、CCE Turbo特性 从华为官方网站……

Continue reading

Deploy, Scale and rollback an Application with Helm

Introduction Containers have revolutionized application development and delivery on account of their ease of use, portability and consistency. And when it comes to automatically deploying and managing containers in the cloud (public, private or hybrid), one of the most popular options today is Kubernetes. Kubernetes is an open source project designed specifically for container orchestration. Kubernetes offers a number of key features, including multiple storage APIs, container health checks, manual or automatic scaling, rolling upgrades and service discovery. Applications can be installed to a Kubernetes cluster via Helm charts, which provide streamlined package management functions. Assumptions and Prerequisites This guide focuses on deploying an example phpbb application in a Kubernetes cluster running on either Huaweicloud CCE or Minikube. This guide makes the following assumptions: You have a Kubernetes 1.5.0 (or later) cluster. You have kubectl installed and configured to work……

Continue reading

Create Your First Helm Chart

Introduction For a typical cloud-native application with a 3-tier architecture, the diagram below illustrates how it might be described in terms of Kubernetes objects. In this example, each tier consists of a Deployment and Service object, and may additionally define ConfigMap or Secret objects. Each of these objects are typically defined in separate YAML files, and are fed into the kubectl command line tool. A Helm chart encapsulates each of these YAML definitions, provides a mechanism for configuration at deploy-time and allows you to define metadata and documentation that might be useful when sharing the package. Helm can be useful in different scenarios: Find and use popular software packaged as Kubernetes charts Share your own applications as Kubernetes charts Create reproducible builds of your Kubernetes applications Intelligently manage your Kubernetes object definitions Manage releases of Helm packages Let……

Continue reading

Latest articles

Categories

Tags

ACL AD AES AI AWS Ansible Atlassian Azure BMC Blockchain Brocade CDH5 CL210 Cobbler Confd C语言 DDOS DISTINCT DNS Duckdb EKS ELK GCP Ghost Git Glusterfs Go Godaddy Grafana HBA HCIE Hotspot HttpWatch IBM IIS IOS InfluxDB Ingress InnoDB JavaScript Jinja2 KVM Keepalived Mplayer MySQLdb Netlify OpenResty PM PostgreSQL QoS RH318 RH442 RHCA RHCE RHEV RSA SRE SecureCRT Statuscode SublimeText2 TC Telecom Tencentcloud VBA aira2 alpine android anpic apache apm apparmor appfog apr apt-get aria2 array atop audit awk awstats axel backdoor backup bamboo bash bat benchmark bigdata bin bind bitwise book bootstrap bsd c1000 cache capistrano catlog centos centos7 chatops chattr check_mk checkinstall cisco clearall clickhouse cloud-desktop cmdb cms collectd comm compress conver corosync cpu crontab crunchbang css curl date decode dell desktop devops df dhcp diff diskpart django docker dos2unix dpkg drupal etcd excel fail2ban fastcgi fdisk fiddler find firewalld flask flvtool ftp function fuser geek gin github gitlab glances golang google gooupadd graphviz gravatra grep grub2 hadoop haproxy hardware heartbeat helm hexdump hhvm history html http/html/web httplogs https huawei huaweicloud hugo icmp iconv ifconfig inotify iopp ipmitool iptables iredmail iscsi isito it-news java jdk jenkins jira join joomla k3s k8s kdump kernel kingate lamp last leetcode lib light-http 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 mpm mrtg mtr my.cnf mysql mysqlbinlog mysqld_multi mysqldump mysqlhotcopy nagios nc nethogs nexus nfs nginx nmon nocatlog node.js nrpe ntfs ntop ntp obs ocr open-falcon openbox opencv openldap openssl openstack oracle oswatch paas pacemaker pam pandas parted pcp pcre pdf percona perl pexpect pgrep php php-fpm ping plsql develope postfix powershell prettify proc prometheus puppeteer pushd pwgen pxe pyecharts python python模块 radmin raid rdesktop read redhat redis redmine regex rh134 rhel7 rhel8 rm rman rootkit route rpm rpmforge rrdtool rsync rsyslog safe saltstack samba scapy screen sed selenium selinux seo seq session set shc sheepdog shell shopt sitemap skydns smokeping snffier snmp socket soft sort spider sql sqlserver squid ss ssh sshpass strace strings su sudo suse svn sysbench syslog-ng sysstat systemd t tar tcpcopy tcpdump tech telnet tengine test testlink threads time tmux tomcat touch tr tsar twisted ubuntu udev ulimit unix unixbench user-agent useradd varnish 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