包含标签 k8s articles

MCP多云跨集群pod互访

一、需求(requirement) 最近遇到的客户需求:需要在不同的云服务提供商的k8s上运行容器服务,平时server1访问server2时,使用本集群上的服务,但当本集群上的server2出现异常时,cluster1上的server1可以连接cluster2上的server2服……

Continue reading

How to migrate an application to k8s

Application knowledge First, you need knowledge about your application. At least one person has to know it very well. If nobody knows the application, you will need a lot of time to answer these questions: Is it stateless or stateful? A stateful application means it changes depending on users actions. For example, an app storing files that are created by the user’s action in the files System will be stateful. The impact of the answer is big, the migration of a stateless application is much easier than the migration of a stateful one. In the case of a stateless service, you have to do nothing. In the other case (stateful application), you need to know which files are stateful and where they are stored on the filesystem. Therefore, someone who has a good knowledge about the application is mandatory. Then, 2 choices are possible:……

Continue reading

华为云CCE部署moodle程序

moodle程序需要通过k8s容器化部署,这里使用了企业版的k8s — 华为云CCE进行测试。因为moodle和常见的应用程序一样,会涉及两部分数据: 数据库数据:这里使用华为云服务RDS MySQL来承载; 应用数据:也就是moodledata数据,这部分通过使用外部存储来存放,存放的方……

Continue reading

单pod里多prometheus exporter端口监控

一、背景 一同事遇到客户在使用华为云CCE时,在一个pod里运行有多个进程,分别需要使用对应的prometheus exporter监控对应的数据。如:pod里同时运行的有nginx、mysql、php,三者都需要配置prometheus监控,在ECS虚拟机上部署是比较简单的,直接运……

Continue reading

Kubernetes Secrets deploy MySQL

Secrets Use Case: Assume we are planning to deploy a MySQL Pod in the Kubernetes cluster. MySQL requires much sensitive information such as host IP address, database name, username, and password. We can create a Pod for MySQL using the mentioned information as a Kubernetes Deployment definition file. In this scenario, the configuration information such as username, password, database name is tightly coupled with the Pod definition. And they are easily visible to all developers who had access to the Pod definition file. In this approach, we are facing two problems. 1. The sensitive information is tightly coupled with Pod and we can not re-use them( means each time we have to type the credentials separately). And updating the credentials is also a tedious task. Why because we need to change the information in each definition file. This approach is……

Continue reading

企业应用容器化改造方式

应公司要求,我把企业容器化的方式在medium上进行了发布。这里列下最初的原始中文版。 应用容器化改造,一般有以下三种方式: 方式一:单体应用整体容器化,应用代码和架构不做任何改动。 方式二:将应用中升级频繁,或对弹性伸缩要求高的组件拆分出来,将这部分组件容器化。 方式三:将应用做全面的……

Continue reading

k8s总结之边车模式sidecar

一、什么是边车模式sidecar 边车模式sidecar是在不改变原有container功能的情况下,在同一个pod下增加其他container来增加对应的功能,因为在同一个Pod下的容是共享一个namespace空间的,所以对应的网络、存储等资源也是同一个空间下的,这就可以很方便……

Continue reading

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

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