26 Ekim 2018 Cuma

solving rancher 2.x setting default storageclass failure on gui

Hi everyone,
If you using rancher 2.x for kubernetes and and nfs-provisioner for storageclass and you cannot set nfs as your default storageclass you have to set this via kubectl.

You can do this by running this command in your main system.
kubectl patch storageclass nfs -p '{"metadata": {"annotations":{"storageclass.kubernetes.io/is-default-class":"true"}}}'

If you getting an error like cannot connect host:8080 you must run kubectl with --kubeconfig param that resolves your kube_config_cluster.yml.

example usage:
 kubectl patch storageclass nfs -p '{"metadata": {"annotations":{"storageclass.kubernetes.io/is-default-class":"true"}}}' --kubeconfig=~/kube_config_cluster.yml

You also can add kube_config_cluster.yml as KUBECONFIG environment value by
export KUBECONFIG=/path/to/kube_config_cluster.yml
or adding in /etc/environment file for persistent usage.
Share:

25 Ekim 2018 Perşembe

Failed to list *v1alpha1.Certificate: the server could not find the requested resource (get certificates.certmanager.k8s.io)

Hi everone, if you getting an error like "Failed to list *v1alpha1.Certificate: the server could not find the requested resource (get certificates.certmanager.k8s.io)" in kube-system cert-manager pod's log you just have to install cert-manager catalog app into kube-system namespace in system project.
Share:

24 Ekim 2018 Çarşamba

kubernetes in container dns resolution problems with flannel vxlan backend

You can change net backend type vxlan to host-gw if you are using a ovh or kimsufi server and you don't sure server's vxlan support and docker containers outgoing connections fails because name resolution. I am using rancher and kubernetes and i changed my net-conf.json config from canal-config configmap. 

Change


net-conf.json



{
"Network": "10.42.0.0/16",
"Backend": {
"Type": "vxlan"
}
}


to 
net-conf.json



{
"Network": "10.42.0.0/16",
"Backend": {
"Type": "host-gw"
}
}

Share: