分类 Docker/k8s/etcd articles

更换Containerd后crictl和ctr命令操作

更换Containerd后,以往我们常用的docker命令也不再使用,取而代之的分别是crictl和ctr两个命令客户端。crictl是遵循CRI接口规范的一个命令行工具,通常用它来检查和管理kubelet节点上的容器运行时和镜像,ctr是containerd的一个客户端工具。 containerd……

Continue reading

Kubernetes Secrets值验证

一、secrets创建 secrets创建方法常见的有三种: kubectl命令直接创建 kubectl命令从文件中获取 通过yaml文件创建 具体如下: 1# 方法1: 2$ kubectl create secret generic <secret-name> --from-literal=iamAdminPasswordKey=<password> --namespace <namespace> 3 4$ kubectl create secret generic cncc-iam-secret --from-literal=iamAdminPasswordKey=cncciampasswordvalue --namespace cncc 5$ kubectl describe secret cncc-iam-secret -n cncc 6 7# 方法2: 8echo -n 'admin' > ./username.txt 9echo -n '1f2d1e2e67df' > ./password.txt 10 11kubectl create secret generic db-user-pass \ 12 --from-file=./username.txt \ 13 --from-file=./password.txt 14 15# 方法3: 16echo -n 'admin'……

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

企业容器化改造方式1:大单体

在 企业应用容器化改造方式 中提到了企业容器化改造的三种方式。其中最理想化的肯定是第三种,先微服务化改造,再容器化。不过这种方式改动较大,实现起来比较费时。一般会先通过第一步,先把应用做成容器大单体。因为后面要为公司内部写《云原生最佳实践》,所以这里就先弄一个简单的例子搞一个大单体的……

Continue reading

容器化运行oracle

在容器化交付成为主流的云时代,oracle这种传统数据库巨无霸也开始适应潮流,将oracle软件也支持容器化部署。通过 https://container-registry.oracle.com/ 站点可以下载官方编译好的oracle镜像,不过前提是先要通过oracle的镜像仓库的授权。不过也可以不使用官方镜像仓库,可以通过官方提供的脚本文件,自已编译镜像……

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

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