Created
March 1, 2020 19:03
-
-
Save rom3r4/f0b7c195154eabcec8c2448c957fd949 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
KUBERNETES, HEROKU | |
# https://github.com/helm/chartste | |
helm install --name odoo4 -f values.yaml stable/odoo | |
helm install --name odoo stable/odoo | |
kubectl get nodes -o yaml |less | |
kubectl describe node 192.168.1.157 | |
ssh administrator@192.168.1.157 | |
kubectl apply -f multi-app-ingress2.yaml | |
kubectl config view | |
kubectl config --kubeconfig=config-demo use-context <cluster> | |
helm install --name ingress stable/nginx-ingress -f nginx-ingree.yaml | |
helm reset --force | |
helm ls --all | |
helm del --purge odoo | |
helm repo update | |
helm install --name nginx-ingress stable/nginx-ingress | |
helm version | |
helm update | |
helm search odoo | |
helm repo add azure-marketplace https://marketplace.azurecr.io/helm/v1/repo | |
helm install azure-marketplace/odoo | |
kubectl get deployments | |
kubectl get nodes | |
kubectl get services/svc | |
kubectl get ns | |
kubectl get po | |
kubectl get pv | |
kubectl get deployments --all-namespaces | |
kubectl get secrets | |
kubectl describe secrets/NAME | |
kubectl port-forward jenkins-5564885478-mqtdp 9000:8080 | |
kubectl get secret --namespace default jenkins -o jsonpath="{.data.jenkins-admin-password}" | base64 --decode; echo | |
kubectl create secret generic db-user-pass --from-file=./username.txt --from-file=./password.txt | |
kubectl create secret generic dev-db-secret --from-literal=username=devuser --from-literal=password=S\\!B\\\*d\\$zDsb | |
cambiar clave: | |
echo -n 3.14159Rj! |base64 | |
—_> passwd en B64 | |
My4xNDE1OVJqIQ== | |
kubectl edit secret --namespace default jenkins | |
kubectl set image deployments/kubernetes-bootcamp kubernetes-bootcamp=jocatalin/kubernetes-bootcamp:v2 | |
kubectl rollout status deployments/kubernetes-bootcamp | |
kubectl rollout undo deployments/kubernetes-bootcamp | |
kubectl logs -f hopping-liger-odoo-2143957105-3319b | |
kubectl create secret generic db-secret --from-literal user=odoo --from-literal password=odoo | |
kubectl get secret db-secret-o yaml | |
kubectl get secret my-secret -o json | jq '.data | map_values(@base64d)' | |
kubectl describe pvc | |
kubectl describe sc | |
kubectl describe pvc odoo (persisten volumes) | |
kubectl delete pv xxx | |
kubectl delete pod/po xxx | |
kubectl delete namespace/ns xxx | |
kubectl exec -it odoo5-odoo-786fff55dd-hsxq6 -- /bin/bash | |
kubectl exec -it odoo4-odoo-8ff7c54b-g8m9m -- /bin/sh -c "kill 1" | |
kubectl apply -f | |
kubectl cp ~/Downloads/inectheme.rar odoo5-odoo-786fff55dd-hsxq6:/bitnami/odoo/addons | |
gcloud components update | |
NOTAS / ERRORES: | |
Error: could not find tiller | |
sol: | |
—— | |
$ kubectl get all --all-namespaces | grep tiller | |
$ kubectl delete deployment tiller-deploy -n kube-system | |
$ kubectl delete service tiller-deploy -n kube-system | |
$ kubectl get all --all-namespaces | grep tiller | |
——>Initialize it again: | |
$ helm init | |
Error: configmaps is forbidden: User "system:serviceaccount:kube-system:default" cannot list resource "configmaps" in API group "" in the namespace "kube-system" | |
SOL: | |
kubectl --namespace kube-system create serviceaccount tiller | |
kubectl create clusterrolebinding tiller-cluster-rule \ | |
--clusterrole=cluster-admin --serviceaccount=kube-system:tiller | |
kubectl --namespace kube-system patch deploy tiller-deploy \ | |
-p '{"spec":{"template":{"spec":{"serviceAccount":"tiller"}}}}' | |
… | |
helm list | |
helm repo update | |
… | |
helm install --name nginx-ingress stable/nginx-ingress | |
cat <<EOF > docker-say.yaml | |
apiVersion: v1 | |
kind: Secret | |
metadata: | |
name: webcontainers-config-docker-say | |
namespace: webcontainers | |
type: Opaque | |
data: | |
image: ZGFuaWxsb3V6L2RvY2tlci1zYXk= | |
EOF | |
— | |
kubectl create -f docker-say.yaml -n webcontainers | |
———— | |
1. Export existing app’s variables to config.txt | |
heroku config -s -a existing-heroku-app > config.txt | |
2. Review and push to another app | |
cat config.txt | tr '\n' ' ' | xargs heroku config:set -a new-heroku-app | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment