-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhh_kube.txt
75 lines (48 loc) · 1.78 KB
/
hh_kube.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
# INIT HELM
##################
# V2
#####
#namespace="velero"
#helm init --tiller-namespace $namespace
#kubectl create serviceaccount -n $namespace tiller
#kubectl create clusterrolebinding tiller-"$namespace" --clusterrole=cluster-admin --serviceaccount="$namespace":tiller
#kubectl patch deploy -n $namespace tiller-deploy -p '{"spec":{"template":{"spec":{"serviceAccount":"tiller"}}}}'
#
#helm --tiller-namespace $namespace list
#
#helm install --tiller-namespace $namespace --namespace $namespace ./ --name mysql --values mysql-mamute-ksysn.yaml
# V3
#####
helm install velero --namespace velero ./ --values values.yaml
# Añadimos un repo de helm
helm repo add chartmuseum https://chartmuseum.edicomgroup.com --username edicom --password 463ff0fc81fa
# Ver el listado de repositorios
helm repo list
# Actualizamos los repositorios
helm repo update
# Buscamos los charts que tenemos en el repositorio
helm search chartmuseum
# Subir un chart al chartmuseum
## Requisito previo
helm plugin install https://github.com/chartmuseum/helm-push.git
## Comprueba la sintaxis del chart
helm3 lint .
## Empaquetamos el chart en un tgz
helm3 package .
## Subimos el targz al repo
helm3 push ceph-csi-rbd-3.3.1.tgz chartmuseum.edicomgroup.com
# KUBECTL USUAL COMMANDS
##########################
kubectl get pods --sort-by=.metadata.creationTimestamp
kubectl get pods X -o yaml
kubectl get events
kubectl create deployment hello-node --image=gcr.io/hello-minikube-zero-install/hello-node
kubectl cm view
# Entrar en el shel del container
kubectl exec -it gitlab-gitaly-0 -n pre /bin/bash
# LOGS
kubectl logs -f --tail=40 gitlab-gitaly-0
# Copy Data to POD
kubectl -n edicomqa cp mamute.sql edicomqa/mysql-7bb7f5d897-l4dgl:/root/
# Para ver los recursos que tienen la API
kubectl api-resources -o wide