我是Helm的新手 . 我在我的Windows系统上安装了Minikube&Helm . 我可以使用Helm创建pod,并在仪表板中查看部署,pods和replicaset .

我想使用Helm进行滚动更新 . 指导我如何使用Helm在K8s中进行滚动更新 .

使用Helm创建Tomcat pod

helm创建hello-world

在deployment.yaml中更改了映像名称和部署名称

kind: Deployment

metadata:

name: mytomcat

spec:

containers:

- name: {{ .Chart.Name }}

image: tomcat

安装

helm安装hello-world

NAME: whopping-dolphin

LAST DEPLOYED: Wed Aug 30 21:38:42 2017

NAMESPACE: default

STATUS: DEPLOYED

RESOURCES:

==> v1/Service

NAME CLUSTER-IP EXTERNAL-IP PORT(S) AGE

whopping-dolphin-hello-world 10.0.0.178 80/TCP 0s

==> v1beta1/Deployment

NAME DESIRED CURRENT UP-TO-DATE AVAILABLE AGE

mytomcat 1 1 1 0 0s

NOTES:

1. Get the application URL by running these commands:

export POD_NAME=$(kubectl get pods --namespace default -l "app=hello-world,release=whopping-dolphin" -o jsonpath="{.items[0].metadata.name}")

echo "Visit http://127.0.0.1:8080 to use your application"

kubectl port-forward $POD_NAME 8080:80

I see mytomcat deployment and pod mytomcat-2768693561-hd2hd in dashboard.

现在我想给出一个命令,它将删除我在k8s中的当前部署和pod,它应该创建新的部署和pod .

如果我得到示例命令和yaml会很有帮助 .

Logo

K8S/Kubernetes社区为您提供最前沿的新闻资讯和知识内容

更多推荐