This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
система_kubernetes [2022/09/27 15:44] val [Работа со своим репозиторием] |
система_kubernetes [2023/01/17 11:50] val [Ingress] |
||
---|---|---|---|
Line 1: | Line 1: | ||
====== Система Kubernetes ====== | ====== Система Kubernetes ====== | ||
+ | |||
+ | * [[https://kubernetes.io/ru/docs/home/|Документация по Kubernetes (на русском)]] | ||
* [[https://youtu.be/sLQefhPfwWE|youtube Введение в Kubernetes на примере Minikube]] | * [[https://youtu.be/sLQefhPfwWE|youtube Введение в Kubernetes на примере Minikube]] | ||
Line 212: | Line 214: | ||
' | ' | ||
- | # don't work in cri-tools 1.25, need public project | + | # don't work in cri-tools 1.25, need public project in GitLab (Settings->General->Visibility, project features, permissions) |
### node1# docker login http://server.corpX.un:5000 | ### node1# docker login http://server.corpX.un:5000 | ||
Line 439: | Line 441: | ||
server# host webd | server# host webd | ||
webd.corpX.un has address 192.168.49.2 | webd.corpX.un has address 192.168.49.2 | ||
- | или | ||
- | webd.corpX.un has address 192.168.X.201 | ||
- | |||
gitlab-runner@server:~$ minikube addons enable ingress | gitlab-runner@server:~$ minikube addons enable ingress | ||
Line 451: | Line 450: | ||
root@node1:~# kubectl port-forward --namespace=ingress-nginx --address 0.0.0.0 service/ingress-nginx-controller 80:80 | root@node1:~# kubectl port-forward --namespace=ingress-nginx --address 0.0.0.0 service/ingress-nginx-controller 80:80 | ||
- | + | </code> | |
+ | <code> | ||
gitlab-runner@server:~/webd$ ### kubectl create ingress my-webd --class=nginx --rule="webd.corpX.un/*=my-webd:80" -n my-ns | gitlab-runner@server:~/webd$ ### kubectl create ingress my-webd --class=nginx --rule="webd.corpX.un/*=my-webd:80" -n my-ns | ||
Line 583: | Line 582: | ||
$ kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-v1.3.1/deploy/static/provider/cloud/deploy.yaml | $ kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-v1.3.1/deploy/static/provider/cloud/deploy.yaml | ||
+ | |||
+ | $ kubectl get all -n ingress-nginx -o wide | ||
$ kubectl delete -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-v1.3.1/deploy/static/provider/cloud/deploy.yaml | $ kubectl delete -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-v1.3.1/deploy/static/provider/cloud/deploy.yaml | ||
- | $ helm upgrade --install ingress-nginx ingress-nginx --repo https://kubernetes.github.io/ingress-nginx --namespace ingress-nginx --create-namespace | + | $ helm upgrade ingress-nginx --install ingress-nginx --repo https://kubernetes.github.io/ingress-nginx --namespace ingress-nginx --create-namespace |
$ helm list --namespace ingress-nginx | $ helm list --namespace ingress-nginx | ||
Line 658: | Line 659: | ||
* [[https://medium.com/containerum/how-to-make-and-share-your-own-helm-package-50ae40f6c221|How to make and share your own Helm package]] | * [[https://medium.com/containerum/how-to-make-and-share-your-own-helm-package-50ae40f6c221|How to make and share your own Helm package]] | ||
* [[https://docs.gitlab.com/ee/user/profile/personal_access_tokens.html|Gitlab Personal access tokens]] | * [[https://docs.gitlab.com/ee/user/profile/personal_access_tokens.html|Gitlab Personal access tokens]] | ||
+ | * role: Mainteiner, api, read_registry, write_registry | ||
<code> | <code> | ||
$ helm repo add --username student --password NNNNN-NNNNNNNNNNNNNNNNNNN webd http://server.corpX.un/api/v4/projects/4/packages/helm/stable | $ helm repo add --username student --password NNNNN-NNNNNNNNNNNNNNNNNNN webd http://server.corpX.un/api/v4/projects/4/packages/helm/stable | ||
"webd" has been added to your repositories | "webd" has been added to your repositories | ||
+ | |||
+ | $ ### helm repo remove webd | ||
$ helm repo list | $ helm repo list | ||
Line 669: | Line 672: | ||
$ helm plugin install https://github.com/chartmuseum/helm-push | $ helm plugin install https://github.com/chartmuseum/helm-push | ||
+ | |||
$ helm cm-push webd-chart-0.1.0.tgz webd | $ helm cm-push webd-chart-0.1.0.tgz webd | ||