Respository code deployment to multiple cluster with different configuration - github

Issue/References Needed
I am looking for a setup where a repository code could be deployed to multiple clusters and all cluster are working on different configurations, I want to understand the possibility of going this using GitHub.
I tried looking for some solution on the internet but was unable to find any referenced article which can support this. Any references could be quite helpful.
Thanks in advance!

I wanted to create multiple deployments from the same container image in the same namespace with different configurations.
These Documentations helped me:
Doc 1
Doc 2

Related

how should i create YAML files for the apps i intend to deploy?

i'm completely new to Kubernetes so forgive me if im asking some dumb questions :-0
when you deploy apps to k8s, you usually write up some yaml files for the app right?
how do you know which k8s objects you should make config file for?
for example, im following a tutorial that deploys mysql on k8s and it says i would need deployment.yaml, secret.yaml, pv.yaml, pvc.yaml and service.yaml but how do you know in the first place you need these config files in order to successfully deploy mysql app?
are there any guide or standard to follow on this matter? all the tutorials or documentations i been watching and reading dont tell me which objects to define for a particular app and why.
i feel like i dont understand k8s at all or seriously missing some import points here
thanks for the answer in advance!!
i've been googling to find answers on the question but can't find any concrete one yet :(
To answer your question in short:
Use Visual Studio Code Kubernetes Tools for a quick generation of deployment manifests (yaml files)
Learn what each key and value in deployment manifests means by reading the docs and modify generated manifests accordingly.
This is way to broad to give a decent answer for, but to make it short. Mentioned files "deployment.yaml, secret.yaml, pv.yaml, pvc.yaml and service.yam" are not specific to only mysql, it's just what you need to deploy your app on Kubernetes. It's not exactly a entry friendly topic and there is just about no reason to write down entire tutorial just for this post, as there is plenty of sources available, so I will just recommend those that I remember helped me:
"you need to learn Kubernetes RIGHT NOW!!" By NetworkChuck
https://www.youtube.com/watch?v=7bA0gTroJjw
"Kubernetes Tutorial for Beginners" by TechWorld with Nana
https://www.youtube.com/watch?v=X48VuDVv0do
And then there is official documentation: https://kubernetes.io/docs/home/
I'd also not skip on paying for some test clusters with the hosting provider, as you will find out that quite a chunk of those files are pre-generated by them.
Hope this helps

How to modify Kubeflow source code before deploying it with Kubernetes?

I encountered the same issue as in https://github.com/kubeflow/kubeflow/issues/6014 with my Kubeflow app. The fix is very simple (just a type casting), then I would like to fix it myself and redeploy Kubeflow.
The problem is that I am running a k3s cluster on my local machine where I have installed Kubeflow bundle via Juju. Then, I cannot change the source code.
How to modify Kubeflow source code before deploying it with Kubernetes?
Should I use the manifest installation https://github.com/kubeflow/manifests#installation ? or a totally different method?
Thank you.
The bug was fixed in the last version of the manifests, then I have finally installed kubeflow directly from the manifests.
But still I am in touch with one Kubeflow developer, I will post here the right way to do modify/deploy if interested.
You got to check out their Github repo. Make changes and use kustomize to install like explained in their wiki. If you check the example folder you can see that it points to all other component folders.
https://github.com/kubeflow/manifests#install-with-a-single-command
One another hack could be, just look for the controllers in Kubernetes eg., deployments created for kubeflow, then modify them; works only if your changes are only related to Kubernetes resource definitions. I suggest going with the first option above for a clean development experience, and hey, that way can you contribute back to the kubeflow project as well, if you changes will benefit others.

Where I can learn the Kubernetes with Hands on

I am sorry if this question sounds silly.
I would like to know any place where I can learn the kubernetes simple to hard way where a beginner can get the whole idea of kubernetes, from scratch until you deploy an application to aws with other tools such as prometheus, stackstorm etc.
I know there are many Youtube videos and Udemy courses, but, I need a different source, maybe a Github Repository, or a Blog that teaches a newbie about Kubernetes from scratch to at least to the intermediate level with commands using minikube.
Thank you so much for your patience with me for a question like this but I really appreciate this. It is hard to find a good tutorial, videos are really boring or out of the scope sometimes.
If you are really want to do it all manually you should check Kubernetes The Hard Way. This tutorial does not have any automation process, you need to do all manually. Honestly I would recommend it after a few days/weeks of practicing with Kubernetes.
Second good place to learn Kubernetes is Katakoda. You can find there Kubernetes and Docker tutorials. If you want to learn Kubernetes you also need to learn something about containers before.
Another place is Kubernetes Tutorials. Also here you can find some Tasks or Concepts. The same site contains whole K8s documentation with real examples.
For environment to run Kubernetes I would advise you Minikube. It will create you one-node cluster. Before you will need instal Docker and Kubectl.
As for beginner I would suggest to use Minikube with --vm-driver=none.
Last source I wanted to mentioned is Medium. You will be able to find many tutorials for Kubernetes/Kubeadm/Minikube.
You can try katacoda .They have provide dummy kubernetes environment.
katacoda
.
Although kubernetes docs are enough to get to know about deployments,services,pods etc. You can try those example in katacoda environment. Kubernetes playground
Katacoda also have some examples .

Kubernetes User Interface

I was going through a Kubernetes tutorial on Youtube and found the following UI which demonstrates pod and service arrangements of Kubernetes cluster.How can I install this UI in my Kubernetes setup?
In order to use this UI, go to the saturnism/gcp-live-k8s-visualizer GitHub repo and follow the steps, there.
The code for that UI is from https://github.com/brendandburns/gcp-live-k8s-visualizer.
the visualizer expects some specific tags to be on the pods / services for them to be displayed. It was built for a demo and I don't think it was generalized to work on arbitrary deployments
As Robert Bailey pointed out, the versions of brendendburns and saturnism are not generealized scripts, but require little modifications on your resource labels (such as labeling things with "name" or "uses").
Maybe this version can help you:
https://github.com/0ortmann/k8s-visualizer
It features minimalistic configuration options. You can configure labels you want the script to use. You do not need to change your actual setup.
Please contact me if you run into issues.

How to run 2 wordpress blogs using docker on ec2

I just started playing around with Docker.io. Its a great platform for sure. I have an issue i need some help with. I ran a medium instance on ec2 setup docker. Now i want to run 2 wordpress blog independent of each other using docker.io on top of the medium instance.
Please if someone can kindly guide me to resolve this issue i will extremely grateful
Many Thanks Indeed
Hareem Haque
Updated:
Basically, what i am trying to do is run two nodes for docker (node 1 & node 2). I run another node (node3: private repo for docker). What i am looking to accomplish is i run two blogs (wordpress on node1). I export the docker images to node3 (updates/exports are done very rarely)
Since i am going to run wordpress i was hoping to run wordpress within Nginx and since node1/node2 will run 80 web i can put a physical node (nginx reverse proxy) in front of the two nodes and have the blogs run in ha mode.
I am hoping that this experiment work so i that i can get rid of the xen cloud platform we have in office. Its to bulky and I have to manage alot of components.
I would rather export/backup docker image with my live data once in a blue moon and not have to worry about failover and vm management.
The problem is that i have a novice when it comes to running docker and thus i am currently running around like a head less chicken with no idea where to properly begin.
I would be extremely grateful if you can provide any guidance/assistance indeed.
Best Regards
Hareem Haque
Hareem asked his question a while back, and there don't seem to be any good answers yet. I'm a noobie as well, and I too want to learn how to use a generic wordpress container that I can push to Amazon or test locally. I'm very new to docker, so this seems like a tall order!
Goal
For now, I'll start collecting some resources here. Maybe they will help Hareem, and others like myself. This document will turn into a complete answer, or prompt someone else to give their version of an answer (which I'm sure is not quite so complex.)
The Docker.io Index
First, the Docker index is a repository of already existing Docker.io components. Of these, there is a wordpress unit that seems relevant here:
jbfink - Wordpress 3.5.2.
Docker on EC2
There is as yet no official Docker support for Ec2. However, the Docker community suggests an install path using a tool called Vagrant. The instructions for this live here:
Docker Doc - Installing on Amazon EC2
Work In Progress
This is not a complete answer to the question. As of right now this only presents a couple of easy to locate resources, and perhaps goes against guidelines. Please bear with this!
Things that need to be answered:
How do we run / test the wordpress container(s) locally?
How do we push the container(s) up to the EC2 instance?
How do we wire the EC2 wordpress containers up to their own domains?
Hopefully I will answer these questions - contributions and forks are welcome. I think Hareem's question is worth answering!