首页 > TAG信息列表 > machangwei

kubernetes之数据管理

 volume emptyDir [machangwei@mcwk8s-master ~]$ kubectl apply -f mcwVolume1.yml #部署emptydir pod/producer-consumer created [machangwei@mcwk8s-master ~]$ cat mcwVolume1.yml apiVersion: v1 kind: Pod metadata: name: producer-consumer spec: containers:

kubernetes 之 Rolling Update 滚动升级

滚动升级 1、错误的yml文件 [machangwei@mcwk8s-master ~]$ cat mcwHttpd.yml apiVersion: apps/v1 kind: Deployment metadata: name: mcw-httpd spec: replicas: 3 selector: matchLabels: run: mcw-httpd template: metadata: labels: run

k8s通过Service访问Pod

如何创建服务 1、创建Deployment #启动三个pod,运行httpd镜像,label是run:mcw-httpd,Seveice将会根据这个label挑选PodapiVersion: apps/v1 [machangwei@mcwk8s-master ~]$ cat mcwHttpd.yml kind: Deployment metadata: name: mcw-httpd spec: replicas: 3 selector: m

es部署

  部署单机版estar xf elasticsearch-7.16.0-linux-x86_64.tar.gz./bin/elasticsearch -dcan not run elasticsearch as root su - machangwei./bin/elasticsearch -d #切换用户后没有权限访问jdk目录warning: usage of JAVA_HOME is deprecated, use ES_JAVA_HOMEcould not fin

sed 修改文件

    总结 正确的修改进文件命令(替换文件内容):sed -i "s#machangwei#mcw#g" mcw.txt 正确的修改追加进文件命令(追加文件内容):sed -i "\$a 8: wo bu hao\!" mcw.txtsed -i '$a 7: wo hen hao!' mcw.txt 最后一行$a追加内容,加上-i修改到文件;单引号无需转义,双引号需要注意特殊字符