How to Build and Deploy an app on Kubernetes by GitLab ci cd pipeline
HTML-код
- Опубликовано: 11 сен 2024
- CI CD pipeline is used for quick and efficient delivery of an application to its consumers. So, In this "How To" presentation I demonstrate how to create a #gitlab CI/CD #pipeline that uses a #Gitlab-Runner to build and push images to GITLAB #container registry and we will learn how to connect an existing #kubernetes Cluster to GitLab and How to deploy applications on cluster using CI/CD tunnel
This #tutorial assumes you have a Local Kubernetes cluster like Racher-Desktop . To setup Rancher Cluster on your windows machine, you can follow this tutorial: • How to Install & Confi...
==========================================
www.buymeacoff...
==========================================
Note:
If you are using GitLab self-managed instance, You need to enable GitLab Kubernetes Agent Server (KAS) from GitLab configuration using below step.
Add below line in /etc/gitlab/gitlab.rb file
gitlab_kas['enable'] = true
Restart or re-configure GitLab.
All Files related to this Project: (1-K8S-CICD folder)
github.com/mka...
How ton install Rancher-Desktop on Windows: • How to Install & Confi...
#kubernetes #gitlab #gitlab-runner # gitlab # build #deploy #ci cd pipeline #gitlab ci cd tutorial #gitlab tutorial #pipeline #devops ci cd pipeline
I've been watching ALOT of devops videos for my job this week, and this is BY FAR the most hands on devops pipeline tutorial I have found. Thank you.
Thank You
The most underrated channel for devops i guess.
This is all we need i guess simple and clear
It is very helping to understand the process of web app deployment into kubernative cluster. It is very good devops channel.
You are the best teacher.
I took so many courses, but the way you teach goes straight to my head. 🎉🎉🎉🎉
Thank you, today I started my day with your energetic sentence.
Thank you for this, it was exactly what I needed. If only the gitlab documentation was as good as this video :)
Thanks
This is such a structured video for those who want to build a complete cicd pipeline. and explanation was really crystal clear ! you are such a gem trainer :) you have really done a fantastic job creating this video, I hope we could get more such end to end project to grind our skills !! Thank you
You built my day with your full energetic sentences
Great tutorial. It has helped me alot. Thank you sir
your explanation was good i need some more this type of project videos
Best explanation of this topic that i have seen, great job
Excellent tutorial and very well explained. Thank you very much !!!
Thank you
Wow! This is what I am looking for! Its so detailed and well explained! Keep the Tutorial Videos coming!
Thanks Raph
solid video. would be even greatet with time sections since it offers so much valuable instructions.
Thank You a lot man for this video
great video!
Thank you very much, it was exactly what I needed :)
You're welcome!
amazing one ✅🚩
it was ,nice , clear and what i was looking for . Thank you
Thanks for the nice comment. لطف دارید
amazing tutorial, ty
Thank you, very helpful.
Glad to hear it!
great explanation very helpful thank you !!!
Thanks
Great teaching
Thanks
These videos are wonderful!
Development of skills and Wisdom and experience and learning education po
best teacher thanks
thank you for great video
It is my pleasure
Great video. It has helped me a lot
Can you please do a video on these topics.
1. Helm charts
2. Istio service mesh
3. Observability with OpenTelemetry
4. GitOps, ArgoCD
Good Ideas, sure will do
@@be-devops yes please about Helm :-)
@@neelojp8460 I am preparing it
Good video, but you didnt mention about runner. I think it was full cicd process if you showed installing runner
Thank you for your comment
Here we more focus on CICD. But i had another video about using gitlab runner:
ruclips.net/video/6BlsKlhOhDE/видео.html
@be-devops Could you explain me, please. In stage deploy, do we need to use kubernetes runner? Or it is enought that we have agent. Because when i am starting my pipeline it gives me error, that here we dont have runner to deploy. Maybe i have a mistake.
@@rikitikitaki5919 no need something like you say kubernetes runner. we do not have such thing.
Only agent is ok
you can contact me by email and send me the issue logs and we can solve it quickly
@@rikitikitaki5919 howtoskillsvid@gmail.com
Really helpful thanks for sharing
Make sure your k8s-connection is in the same group as the project you're trying to deploy. If it's not, the deployment step will fail trying to set kubectl contexts.
awesome video
Hello, great explanation!!!
I have a gitlab-ci.yml identical to yours, but in the build stage, I set the tags: build, only.
The deploy is identical. When I push, the stage build completes successfully, but the stage deploy
is waiting for a runner. I believe that with the gitlab agent, there is no need for a runner, correct?
yes deploy also need gitlab runner, because you are using an image to run kubectl command
check yr deploy config. or send me by email to check it for you
howtoskillsvid@gmail.com
I followed your step when deploying application manually in k8s cluster , i did the same thing but i am unable to access the application using internal IP of the cluster but i am able to access it through localhost:nodeport . What might haves caused this problem or is it not a problem at all ? Thanks
check yr firewall
Superior of all physicians group multidisciplinary plan and professionalism for all the healthcare workers po
First of all thnaks a lot for this video. I am fasinf agent connection issue. I'm using our company gitlab server and Connect a Kubernetes cluster return an error: Gitlab Failed to register an agent GRPC::Unimplemented . By the way my kubernetes running in Proxmox and it is kubeadm cluster.
Please check in Kubernetes Cluster that Helm chart installed successfully and agent is running.
you can reach me by email and we can discuses on it
@@be-devops Where can i find your email.
@@elchinefa9524 howtoskillsvid@gmail.com
Thanks for the detailed Video. Help me alot !!!
Want to ask you that when i run 'kubectl get node -o wide' and take the internal ip of the node-cluster, i am not able to connect to my app on browser.
I have installed docker for windows on my windows machine. Then minicube for Kubernetes. Should i install anything else.
Please check your firewall on windows and maybe blocked it
but as i described I am using Rancher Desktop and really is amazing
for its installation you can check my other video:
ruclips.net/video/I9YtRhPRMqc/видео.html
New development for skills Experience wisdom creativity and all my talents and wisdoms righteousness obedience training equipment po
Hi Thankyou so much for your video I have made a similar lab for testing CICD Gitlab I am facing issues whule pusing the code in gitlab container I would appreciate your help
Thanks
thanks for the tutorial, I have a problem if I update coding and push to gitlab, build image and deploy successfully.
but it seems like the pod or service or image in microk8s is not updated
and if I delete the service and pod first then push to gitlab, its work. my gitlab ci yaml is same with tutorial
Teacher i have a problem, in the same group i have acces to the k8s aggent with every project without any problem, but when i need the k8s agent in another group i have'nt access, and i've already added the ci_access project and group to access it, but it doesn't work :((. I've my own self hosted gitlab and i've put as true the gitlab_kas['enable']. Help pls
Nice video!
Could you give me advice by best practices.
In your case you store k8s yaml files in your project repo. But i am developing microservices architecture and my files are storing in separated repo "infrastructure".
How to get files from there? Git clone my private repo during the build?
Hi Friend,
You can find your answer here in this video:
ruclips.net/video/OvgXuGskdCM/видео.html
I described there how to clone other repo in CICD
You didn't mention runners there
Hi bro, thanks for the video. May I know how to access the source code
In description there is Github repo address.
but here you are:
All Files related to this Project: (1-K8S-CICD folder)
github.com/mkaraminejad/cicd_pipeline
And god po
Hello ad, can you share me the repo of web in k8s-data. Very thanks you
I added this repo in description
github.com/mkaraminejad/cicd_pipeline.git
folder 1-K8S-CICD
Sir/Dr. mark Anthony familaran po and mommy/dr.Carmela domocmat po
Thank you ! But i have never connected status !! and i have a "Failed to register agent pod. " problem ! Can you help please !?
Thank you for your comment.
To make connection I would check cluster side. I suggest you when in gitlab side you create a connection, copy helm codes and past them in Cluster side.
After please check if everything in cluster side working well:
1) kubectl get ns
you will see the name spaces and also the one for gitlab
2) kubectl -n get pods
ex:
kubectl -n gitlab-agent-k8s-connection get pods
the result will show you the pods should be in running status.
If pods be in Running status but still you have no connection in gitlab, check your firewall
You can reach me by Email.
@@be-devops Can you give me your email please ?
at about 29:26 you're showing the building of the image with a public gitlab provided runner.. is the agent also capabale of building or how should one go about supporting not just operations but build steps in our private k8s? seems I need more runner types installed?
Hello, I did not get your question
would you please send me more details in my email
howtoskillsvid@gmail.com
I'd rather not reveal my email.. but I think I understand.. you built the docker image using gitlabs free runners... I wanted to see if you could build docker images within the k3s cluster.. but very good video thanks ! @@be-devops
@@hwy9nightkid Good Hint. I will check K3S and will try to do. Thanks
🙏😇
When the Docker image has already been built in the gitlab registry. Why do we need to push it again? Won't the image be there already?
When it had been built by CICD , it is located on gitlab runner and when the job done by gitlab runner it will gone because it is a container so we need to push it on gitlab repository that be useable
@@be-devops Thankyou for the prompt response. Please also make a video on how helm charts, gitlab-ci.yaml, Dockerfile and Docker-compose.yaml are related?
I have seen all of them in a single project and could not understand the use of all of them.
@@shivendrasingh5550 check my latest video in my channel using helm chart with CICD to deploy on K8S
Physicians group multidisciplinary plan
inmy case i have installed kubecluster in my local environment when i did the same as you presented my agent is not connecting.
can you provide any solution for that.
do you have access to your kube cluster from your local machine terminal? for example if you open yr terminal and type "kubectl get node -o wide" works?
because at first you have to be sure you cluster works well. contact me by "howtoskillsvid@gmail.com" and we can solve the issue
Same with me. Any idea why its happening?
@@nikhiltaneja9825 i have solved my issue what exactly the problem u r facing?
@@nikhiltaneja9825 my issue was resolved can u b more specific of the issue?
getting an error occurred while loading your agents
your k8s cluster is in remote or local?
New cluster and projects po
Sir Henry and sir Aiken and sir danni Po and madam butterfly and madam/Dr. Carolyn and madam divine and madam mercy and madam Kris amoyo po and madam grace po
God and whole dragons teams po Kuya Bobby and ate Anna Po and bata Po kami ni thel Po mommy Carmela Po
Thank you god and sir mark Anthony familaran po and mommy Carmela Po box online and meetings Po 🤝🐉 Kuya Bobby and ate Anna Po nakakainis maraming thesis papers natin Po
Thank you for your video and presentation. after following deployment is ok and manual deployment also work, but i have this message at the end of cd/cd process. any clue why? thank you @be_devops
.gitlab-ci.yml": error validating data: [apiVersion not set, kind not set]; if you choose to ignore these errors, turn validation off with --validate=false
Please share me the content of .gitlab-ci.yml by my email: howtoskillsvid@gmail.com