backup
This commit is contained in:
parent
27358f3a8a
commit
dcc9b1bf52
|
@ -0,0 +1,5 @@
|
|||
HorizontalPodAutoscaler
|
||||
动态扩缩容基于cpu和内存
|
||||
安装插件
|
||||
1. gihub中查找metrics-server应用
|
||||
2. 修改yml中镜像,认证端口整数 和volume
|
Binary file not shown.
After Width: | Height: | Size: 227 KiB |
Binary file not shown.
After Width: | Height: | Size: 230 KiB |
Binary file not shown.
After Width: | Height: | Size: 177 KiB |
Binary file not shown.
After Width: | Height: | Size: 270 KiB |
Binary file not shown.
After Width: | Height: | Size: 302 KiB |
|
@ -0,0 +1,6 @@
|
|||
路径
|
||||
http://hy-node3:30880/clusters/default/base-info
|
||||
admin
|
||||
Sxh123456!
|
||||
网络端口查看
|
||||
ss -anput |grep port
|
|
@ -0,0 +1,98 @@
|
|||
PV
|
||||
|
||||
使用nfs
|
||||
```
|
||||
yum install -y nfs-utils
|
||||
# 查看是否安装
|
||||
cat /etc/exports
|
||||
showmount -e 127.0.0.1
|
||||
systemctl start rpcbind
|
||||
systemctl enable rpcbind
|
||||
systemctl status rpcbind
|
||||
|
||||
mkdir /data/nfs
|
||||
mount -f nfs 10.0.0.245:/data/nfs /data/nfs
|
||||
```
|
||||
编辑pv.yml
|
||||
|
||||

|
||||
|
||||
pvc
|
||||
|
||||

|
||||
|
||||
|
||||
deployment
|
||||
```
|
||||
apiVersion: v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: dp-pvc
|
||||
namespace: kube-test
|
||||
labels:
|
||||
app: dp-pvc
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app: dp-pvc
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: dp-pvc
|
||||
spec:
|
||||
containers:
|
||||
- name :dp-pvc
|
||||
image: harbor.captain.com/captain/nginx:1.19.8-alpine
|
||||
ports:
|
||||
- containerPort: 80
|
||||
volumeMounts:
|
||||
- name: dp-pvc
|
||||
mountPath: /usr/share/nginx/html
|
||||
volumes:
|
||||
- name: dp-pvc
|
||||
persistentVolumeClaim:
|
||||
claimName: pvc
|
||||
|
||||
```
|
||||
|
||||
service
|
||||
```
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: dp-pvc
|
||||
namespace: kube-system
|
||||
labels:
|
||||
app: dp-pvc
|
||||
spec:
|
||||
# type: ClusterIP
|
||||
selector:
|
||||
app: volume
|
||||
# clusterIP:
|
||||
ports:
|
||||
- name: dp-pvc
|
||||
protocol: TCP
|
||||
port: 80
|
||||
targetPort: 80
|
||||
```
|
||||
|
||||
ingress
|
||||
|
||||
```
|
||||
apiVersion: extensions/v1beta1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: nginx
|
||||
namespace: kube-system
|
||||
labels:
|
||||
app: nginx
|
||||
spec:
|
||||
rules:
|
||||
- host:
|
||||
http:
|
||||
paths:
|
||||
- path: /
|
||||
backend:
|
||||
serviceName:
|
||||
servicePort:
|
||||
```
|
|
@ -0,0 +1,3 @@
|
|||
用户:ServiceAccount
|
||||
角色:Role,ClusterRole(集群角色无需namespace)
|
||||
绑定:RoleBinding,ClusterRoleBinding
|
|
@ -0,0 +1,4 @@
|
|||
sts
|
||||
1. 有序部署
|
||||
2. 固定的IP无clusterIP
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
# configmap
|
||||
## 使用配置文件
|
||||
kubectl creat cm env --from-file= -n kube-ticai
|
||||

|
||||
## 使用环境变量
|
||||
kubectl creat cm env --from-env-file= -n kube-ticai
|
||||
envFrom:
|
||||
|
||||
|
||||
# secrity
|
||||
## opaque 通用型
|
||||
|
||||
kubectl create secret generic test --from-file=
|
||||
|
||||
kubectl get secret test-v1 -O jsonpath='{.data}'
|
||||
## kubenretes.io/service-account-token表示k8s服务账户
|
||||
## kubernetes.io/dockerconfigjson
|
||||

|
||||
|
||||
|
||||
## kubernetes.io/tls
|
||||
## kubernetes.io/ssh-auth/basic-auth
|
Loading…
Reference in New Issue