我是如何进行上云的3
kubectl taint nodes node1 key=value:NoSchedule
kubectl taint nodes node1 key=value:NoExecute
kubectl taint nodes node1 key=value:PreferNoSchedule #尽量不调度
NoSchedule:K8Snode添加这个effecf类型污点,新的不能容忍的pod不能再调度过来,但是老的运行在node上不受影响
NoExecute:K8Snode添加这个effecf类型污点,新的不能容忍的pod不能调度过来,老的pod也会被驱逐
PreferNoSchedule:pod会尝试将pod分配到该节点
删除污点
kubectl taint nodes kube11 key:NoSchedule-
apiVersion: v1
kind: Pod
metadata:
name: liveness-http
namespace: default
spec:
containers:
- name: liveness-http
image: httpd:2.2.32
imagePullPolicy: IfNotPresent
ports:
- name: http
containerPort: 80
livenessProbe:
httpGet:
port: 80
path: /index.html
initialDelaySeconds: 15
periodSeconds: 3
failureThreshold: 1
---
apiVersion: v1
kind: Pod
metadata:
name: livenes-tcp
namespace: default
spec:
containers:
- name: livenes-tcp
image: httpd:2.2.32
imagePullPolicy: IfNotPresent
ports:
- name: http
containerPort: 80
livenessProbe:
tcpSocket:
port: 80
initialDelaySeconds: 15
periodSeconds: 1
timeoutSeconds: 2
解压放入/usr/local/bin
mv linux-amd64/helm /usr/local/bin/helm
使用命令
添加远端仓库(阿里云)
helm repo add apphub https://apphub.aliyuncs.com/
helm repo update
helm repo list
helm repo remove stable(删除远端仓库)
helm search repo nginx查找模板
helm pull apphub/mariadb --version 7.3.9(下载模板)
- 点赞
- 收藏
- 关注作者
评论(0)