Why don't setup kube-dns in PAI k8s cluster? - kubeflow

I tried to deploy kubeflow in the clusters and found there was no dns service available. I am not sure the reason, could someone explain it ?

We tried to minimize the dependency. PAI doesn’t need dns. You can add dns service to k8s deployment yourself.

Related

How to access a Kubernetes Pod in Docker?

The setup below is all done on Google Cloud.
I have a Docker setup running on a VM instance having a Hyperledger Fabric Network of 3 Orderers and 2 peers of a single organization.
I have a Kubernetes Cluster running on GKE having just 2 peer pods.
What I want to achieve is:
I want the peer pod of Kubernetes to be able to communicate with the network setup in Docker.
i.e. I want at least 1 peer of the Kubernetes to be able to join the network channel on the Docker
Network and be able to perform some transaction/query.
Till now what I have done is exposed the services of the 2 peer pods in Kubernetes i.e. ClusterIP -> NodePort.
I have done some reading as to what options are there such as having an Nginx proxy and other things, but I am new to this and still in a beginner phase so a few things are still confusing to me.
Any help would be appreciated.
Since you have two separate container setups (and two different container technologies), containers in one space have to communicate with the other as though they're outside the cluster. You can't join arbitrary Docker containers on another instance into the Kubernetes network environment, nor can you join Kubernetes pods into a single-host Docker network environment.
Using a NodePort or LoadBalancer-type Service as you already have is close to the best you can do, particularly if the underlying protocol isn't HTTP. If you need a multi-host setup, migrating the whole thing into GKE might be a better long-term answer.

Host service on Minikube with public available TCP connection?

I'm currently working on making a game where the servers need to be replicated on pods inside the Minikube cluster (I'm using Minikube since it's just a school project). However, I cannot seem to figure out how to make these game servers accessible from other networks. I have tried making a NodePort service, that points to the deployment of my server image, and when using the Minikube cluster IP + my service's port I can connect fine.
What would be the best approach to solve this issue?
By default, the Pod is only accessible by its internal IP address within the Kubernetes cluster. To make the your container accessible from outside the Kubernetes virtual network, you have to expose the Pod as a Kubernetes Service in this example as a type LoadBalancer.
On cloud providers that support load balancers, an external IP address would be provisioned to access the Service. On Minikube, the LoadBalancer type makes the Service accessible through the minikube service command.
Minikube is great for local setups but not for real clusters. It spins up only a one-node cluster for development and testing. It is useless if you want to use multiple servers environment.
Taking under consideration that you want to play fast with scalability across the nodes it is useful to create Kubernetes cluster - using Kubespray or Kubeadm.
If you want to run an actual local Kubernetes, use a local VM and then create K8s cluster using these tools for automated deployment.
Kubeadm
The kubeadm tool is good if you are new in cloud technologies -run k8s cluster for the first time. You can install and use kubeadm on various machines: your laptop, a set of cloud servers and more. Whether you’re deploying into the cloud or on-premises, you can integrate kubeadm into provisioning systems such as Ansible or Terraform.
Kubeadm provides domain Knowledge of Kubernetes clusters' life cycle management, including self-hosted layouts, dynamic discovery services and so on.
Kubespray
Kubespray supports deployments on AWS, Google Compute Engine, Microsoft Azure, OpenStack, and bare metal. It enables deployment of Kubernetes highly available clusters. It supports a variety of Linux distributions and CI. Kubespray supports kubeadm.
There isn't really a good way to do this. Minikube is for local development. If you want to run an actual local Kubernetes, start a local VM directly and use something like kubeadm and kubespray.

Running Ingress in local using docker

Can someone help me on how to run Ingress in my local using Docker/Kitematic? Not able to get this figured out.
What exactly are you trying to accomplish? I think you need to install an ingress controller such as Ambassador in your cluster, and that can be installed just like any other Kubernetes deployment.
An ingress controller reads ingress resources, and routes traffic to Kubernetes services/pods in your cluster based on ingress.

Will that cause any problem using flannel and calico in same kubernetes cluster?

I have installed kubernetes on digital ocean cloud. I installed both flannel and calico as CNI. Will, that causes any problems in my cluster?
Calico and Flannel uses different default IP subnets and CNI driver binaries, they will not work together on the same cluster if you deploy them using standard (not Canal) installations. But it's required for Kubernetes cluster to have one of the network add-on installed. You are not limited to use Flannel or Calico add-ons, there are more of them
To remove Calico or Flannel from the cluster usually it's enough to run kubectl delete -f <calico-or-flannel.yaml> and reboot all nodes to get rid of interfaces created by Calico or Flannel. You may need to rejoin worker nodes to the cluster after that.
You can use them together, but make sure you configure things so that Calico isn't trying to control tunneling or routing. This joint configuration is sometimes called "Canal", but you can find the docs most on the Calico side at https://docs.projectcalico.org/v3.4/getting-started/kubernetes/installation/flannel

Docker/Kubernetes - how to share dns names between containers?

I have a newbie question about Docker and Kubernetes.
For example I have three PHP services in different containers. Nginx and php-fpm are in different containers too for each PHP service (1 process = 1 container).
Each PHP service should know the DNS name of the other PHP services in the cluster - how can I solve this? How should I configure the cluster and containers/pods to make it possible?
Thank you in advance for you help.
Sincerely,
gtw000
Kubernetes services create a DNS record that resolves to an IP. When you communicate with this IP the request reaches one of the pods the service is targeted on.
For example, if you have the following services: svc1, svc2 and svc3
svc1 should be a resolvable hostname that directs the traffic to one of svc1's pods
The same goes for svc2 and svc3
Please read further on K8s Services Docs

Resources