K8s: Difference between revisions
Jump to navigation
Jump to search
(→Volume) |
|||
Line 28: | Line 28: | ||
==Volume== | ==Volume== | ||
{| | |||
|valign='top'| | |||
<source lang="properties"> | |||
cat <<EOF | kubectl apply -f - | |||
apiVersion: v1 | |||
kind: PersistentVolume | |||
metadata: | |||
name: chorke-pv | |||
spec: | |||
capacity: | |||
storage: 10Gi | |||
volumeMode: Filesystem | |||
accessModes: | |||
- ReadWriteOnce | |||
persistentVolumeReclaimPolicy: Retain | |||
storageClassName: chorke-local-storage | |||
hostPath: | |||
path: /home/shahed/.chorke/academia/var/k8s | |||
nodeAffinity: | |||
required: | |||
nodeSelectorTerms: | |||
- matchExpressions: | |||
- key: k8s.io/minikube-hostpath | |||
operator: In | |||
values: | |||
- node-hostname | |||
--- | |||
apiVersion: v1 | |||
kind: PersistentVolumeClaim | |||
metadata: | |||
name: chorke-pvc | |||
spec: | |||
accessModes: | |||
- ReadWriteOnce | |||
resources: | |||
requests: | |||
storage: 10Gi | |||
storageClassName: chorke-local-storage | |||
EOF | |||
</source> | |||
|valign='top'| | |||
<source lang="properties"> | |||
cat <<EOF | kubectl delete -f - | |||
apiVersion: v1 | |||
kind: PersistentVolume | |||
metadata: | |||
name: chorke-pv | |||
spec: | |||
capacity: | |||
storage: 10Gi | |||
volumeMode: Filesystem | |||
accessModes: | |||
- ReadWriteOnce | |||
persistentVolumeReclaimPolicy: Retain | |||
storageClassName: chorke-local-storage | |||
hostPath: | |||
path: /home/shahed/.chorke/academia/var/k8s | |||
nodeAffinity: | |||
required: | |||
nodeSelectorTerms: | |||
- matchExpressions: | |||
- key: k8s.io/minikube-hostpath | |||
operator: In | |||
values: | |||
- node-hostname | |||
--- | |||
apiVersion: v1 | |||
kind: PersistentVolumeClaim | |||
metadata: | |||
name: chorke-pvc | |||
spec: | |||
accessModes: | |||
- ReadWriteOnce | |||
resources: | |||
requests: | |||
storage: 10Gi | |||
storageClassName: chorke-local-storage | |||
EOF | |||
</source> | |||
|- | |||
|colspan='2'| | |||
---- | |||
|- | |||
|valign='top'| | |||
|valign='top'| | |||
|- | |||
|colspan='2'| | |||
---- | |||
|- | |||
|valign='top'| | |||
|valign='top'| | |||
|} | |||
==Argo CD== | ==Argo CD== |
Revision as of 10:38, 28 May 2023
Kind
|
||
| ||
Volume
cat <<EOF | kubectl apply -f -
apiVersion: v1
kind: PersistentVolume
metadata:
name: chorke-pv
spec:
capacity:
storage: 10Gi
volumeMode: Filesystem
accessModes:
- ReadWriteOnce
persistentVolumeReclaimPolicy: Retain
storageClassName: chorke-local-storage
hostPath:
path: /home/shahed/.chorke/academia/var/k8s
nodeAffinity:
required:
nodeSelectorTerms:
- matchExpressions:
- key: k8s.io/minikube-hostpath
operator: In
values:
- node-hostname
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: chorke-pvc
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 10Gi
storageClassName: chorke-local-storage
EOF
|
cat <<EOF | kubectl delete -f -
apiVersion: v1
kind: PersistentVolume
metadata:
name: chorke-pv
spec:
capacity:
storage: 10Gi
volumeMode: Filesystem
accessModes:
- ReadWriteOnce
persistentVolumeReclaimPolicy: Retain
storageClassName: chorke-local-storage
hostPath:
path: /home/shahed/.chorke/academia/var/k8s
nodeAffinity:
required:
nodeSelectorTerms:
- matchExpressions:
- key: k8s.io/minikube-hostpath
operator: In
values:
- node-hostname
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: chorke-pvc
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 10Gi
storageClassName: chorke-local-storage
EOF
|
| |
| |
Argo CD
kubectl create namespace argocd kubectl get namespace -A kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml kubectl get -n=argocd pod kubectl get -n=argocd service -n argocd kubectl port-forward -n=argocd service/argocd-server 8080:80 kubectl get -n=argocd -o=yaml secret argocd-initial-admin-secret echo RE83Uk81QTU5clZyLTlsdg== | base64 --decode https://localhost:8080/login
kubectl get -n=argocd configmap kubectl get -n=argocd deployment kubectl get -n=argocd service kubectl get -n=argocd secret kubectl get -n=argocd event kubectl get -n=argocd pod |
kubectl edit -n=argocd configmap argocd-rbac-cm kubectl edit -n=argocd configmap argocd-cm kubectl edit -n=argocd deployment argocd-redis kubectl edit -n=argocd service argocd-redis kubectl edit -n=argocd secret argocd-secret kubectl edit -n=argocd pod argocd-app-ctrl-0 |
kubectl get -n=argocd -o=yaml configmap argocd-rbac-cm kubectl get -n=argocd -o=yaml configmap argocd-cm kubectl get -n=argocd -o=yaml deployment argocd-redis kubectl get -n=argocd -o=yaml service argocd-redis kubectl get -n=argocd -o=yaml secret argocd-secret kubectl get -n=argocd -o=yaml pod argocd-app-ctrl-0 |
Knowledge
snap services maas snap services juju snap services lxd |
minikube addons enable default-storageclass
minikube addons enable metrics-server
minikube addons enable metallb
|
minikube addons configure metallb
minikube addons enable olm
minikube addons list
|
| ||
References
| ||
| ||