WSO2 API Manager Kubernetes deployment - kubernetes

so I'm using this repo
https://github.com/wso2/kubernetes-apim/blob/master/simple/am-single/README.md
To deploy WSO2 to an AKS service.
I have my pods setup, as well as services and ingresses.
The thing is I can't access my services.
In the beginning it told me to install the nginx-ingress, I suppose it has something to do with that. If anyone can help me get through this, it would be huge.

Yes, you have to create an Ingress Controller which allows you to bring traffic into the K8S cluster. You can refer to this document. Make sure you follow the AKS-specific section from the document. This will provision IAAS provider-specific infrastructure components that are required along with NginX. After Installing the ingress follow the instructions here.

I usually hate this kind of "rtm" answer, but it's really not worth doing a duplicata of this great documentation here.
It's worth going through the whole walkthrough even if at some point you figured out what's wrong. You'll learn a lot :)

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

Migrating Atlassian Confluence to Kuberntes

I am in the process of migrating Atlassian Confluence from on-prem to Kubernetes. I found the official docker image for confluence and was able to spin up the application. I need to configure ssl and i already have the key and certificate. I tried to import the certificates and restarted the server.xml and it is not working. Has any worked on confluence migration from on-prem to kubernetes/docker and if any can provide a link/experience related to the same, it would be helpful.
Regards,
John
It's certainly possible, the healthcheck might be tricky and the reason for that is there is no automated install as far as I'm aware when it becomes live, meaning there will always been a manual configuration stage.
You're best looking at some package manager examples for this, which for Kubernetes is Helm. This allows you to iterate and rollback quickly.
Have a look at this example) which is for Jira, but the same flow should apply. Confluence and Jira are heavily related, so it should be relevant.

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 .

Can someone explain me some use cases of helm?

I’m currently using kubernetes and I came across of helm.
Let’s say I don’t like the idea of “infecting” my kubernetes cluster with a process that is not related to my applications but I would gladly accept it if it could be beneficial.
So I made some researches but I still can’t find anything I can’t easily do by using my yaml descriptor and kubectl so for now I can’t find an use except,maybe, for the environizing.
For example (taking it from guides I read:
you can easily install application, eg. helm install nginx —> I add an nginx image to my deployment descriptor, done
repositories -> I have docker ones (where I pull my images from)
you can easily helm rollback in case of release failure-> I just change the image version to the previous one in my kubernetes descriptor, easy
What bothers me is that, at level of commands, I do pretty much the same effort (helm update->kubectl apply).
In exchange for that I have a lot of boilerplate because of keeping the directory structure helm wants and I feel like missing the control I have with plain deployment descriptors ...what am I missing?
It is totally understandable your question. For small and simple deploys the benefits is not actually that great. But when the deploy of something is very complex Helm helps a lot.
Think that you have a couple squads that develop microservice for some company. If you can make a Chart that works for most of them, the deploy of each microservices would differ only by the image and the resources required. This way you get an standardized deployment and easier to all developers.
Another use case is deploying applications which requires a lot of moving parts. For example, if you want to deploy a Grafana server on Kubernetes you're probably going to need at least a Deployment and a Configmap, then you would need a service that matches this deployment. And if you want to expose it to the internet you need an ingress too.
One relatively simple application, would require 4 different YAMLs that you would to manually configure and make sure everything is correct instead you could do a simple helm install and reuse the configuration that someone has already made, sometimes even the company who created the Application.
There are a lot of other use cases, but these two are the ones that I would say are the most common.
Here's three suggestions of ways Helm can be useful:
Your continuous deployment system somewhat routinely produces new builds and wants to send them to the Kubernetes cluster. You can use templating to specify the image name and tag in a deployment, and so helm upgrade ... --set tag=201907211931 to request a specific tag.
You might have various service-specific controls like the log level or external database hostnames. The Helm values mechanism gives a uniform way to specify them, without having to know the details of the Kubernetes YAML files.
There is a repository of pre-packaged application charts, so if you want replicated PostgreSQL with in-cluster persistent storage, that's already built for you and you can just depend on it, rather than figuring out the right combination of StatefulSets and PersistentVolumeClaims yourself.
You can combine these in interesting (and potentially complex) ways: use an in-cluster database for developer testing but use a cloud-hosted and backed-up database for production, for example, and compute the database host name based on what combination of settings are provided.
There are, of course, alternative ways to do all of these things. Kustomize in particular can change the image value fairly straightforwardly, and is notable for having been included in the kubectl tool since Kubernetes 1.14 (see also Declarative Management of Kubernetes Objects Using Kustomize in the Kubernetes documentation). The "operator" pattern gives an alternate path to install software in your cluster, but even more so than Helm you're trusting an arbitrary program with API access.

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.