ch仓库创建
mkdir -p /data/charts
chmod -R 777 /data/charts/
kubectl create ns chartmuseum
vi chartmuseum.yaml
---
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: chartmuseum
name: chartmuseum
namespace: chartmuseum
spec:
replicas: 1
selector:
matchLabels:
app: chartmuseum
template:
metadata:
labels:
app: chartmuseum
spec:
containers:
- image: chartmuseum/chartmuseum:latest
imagePullPolicy: IfNotPresent
name: chartmuseum
ports:
- containerPort: 8080
protocol: TCP
env:
- name: DEBUG
value: "1"
- name: STORAGE
value: local
- name: STORAGE_LOCAL_ROOTDIR
value: /charts
volumeMounts:
- mountPath: /charts
name: charts-volume
volumes:
- name: charts-volume
hostPath:
path: /data/charts
type: Directory
---
apiVersion: v1
kind: Service
metadata:
name: chartmuseum
namespace: chartmuseum
spec:
ports:
- port: 8080
protocol: TCP
targetPort: 8080
selector:
app: chartmuseum
kubectl apply -f chartmuseum.yaml
kubectl get svc -n chartmuseum
curl 10.106.178.78:8080
- 点赞
- 收藏
- 关注作者
评论(0)