包含标签 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 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