Can't delete flannel plugin - networking

I'm trying to switch network plug-in from flannel to something else just for educational purposes.
The flannel had been installed via:
kubectl apply -f https://raw.githubusercontent.com/coreos/flannel/master/Documentation/kube-flannel.yml
So to remowe it I'm trying to
kubectl delete -f https://raw.githubusercontent.com/coreos/flannel/master/Documentation/kube-flannel.yml
As a result I've got:
k8s#k8s-master:~$ kubectl delete -f https://raw.githubusercontent.com/coreos/flannel/master/Documentation/kube-flannel.yml
Error from server (NotFound): error when deleting "https://raw.githubusercontent.com/coreos/flannel/master/Documentation/kube-flannel.yml": clusterroles.rbac.authorization.k8s.io "flannel" not found
Error from server (NotFound): error when deleting "https://raw.githubusercontent.com/coreos/flannel/master/Documentation/kube-flannel.yml": clusterrolebindings.rbac.authorization.k8s.io "flannel" not found
Error from server (NotFound): error when deleting "https://raw.githubusercontent.com/coreos/flannel/master/Documentation/kube-flannel.yml": serviceaccounts "flannel" not found
Error from server (NotFound): error when deleting "https://raw.githubusercontent.com/coreos/flannel/master/Documentation/kube-flannel.yml": configmaps "kube-flannel-cfg" not found
error when stopping "https://raw.githubusercontent.com/coreos/flannel/master/Documentation/kube-flannel.yml": timed out waiting for the condition
It's strange cause several hours earlier I've made such operations with weave & worked fine.

I have got the similar errors in output:
kubectl delete -f https://raw.githubusercontent.com/coreos/flannel/master/Documentation/kube-flannel.yml
Error from server (NotFound): error when deleting "https://raw.githubusercontent.com/coreos/flannel/master/Documentation/kube-flannel.yml": podsecuritypolicies.policy "psp.flannel.unprivileged" not found
Error from server (NotFound): error when deleting "https://raw.githubusercontent.com/coreos/flannel/master/Documentation/kube-flannel.yml": clusterroles.rbac.authorization.k8s.io "flannel" not found
Error from server (NotFound): error when deleting "https://raw.githubusercontent.com/coreos/flannel/master/Documentation/kube-flannel.yml": clusterrolebindings.rbac.authorization.k8s.io "flannel" not found
Error from server (NotFound): error when deleting "https://raw.githubusercontent.com/coreos/flannel/master/Documentation/kube-flannel.yml": serviceaccounts "flannel" not found
Error from server (NotFound): error when deleting "https://raw.githubusercontent.com/coreos/flannel/master/Documentation/kube-flannel.yml": configmaps "kube-flannel-cfg" not found
Error from server (NotFound): error when deleting "https://raw.githubusercontent.com/coreos/flannel/master/Documentation/kube-flannel.yml": daemonsets.apps "kube-flannel-ds-amd64" not found
Error from server (NotFound): error when deleting "https://raw.githubusercontent.com/coreos/flannel/master/Documentation/kube-flannel.yml": daemonsets.apps "kube-flannel-ds-arm64" not found
Error from server (NotFound): error when deleting "https://raw.githubusercontent.com/coreos/flannel/master/Documentation/kube-flannel.yml": daemonsets.apps "kube-flannel-ds-arm" not found
Error from server (NotFound): error when deleting "https://raw.githubusercontent.com/coreos/flannel/master/Documentation/kube-flannel.yml": daemonsets.apps "kube-flannel-ds-ppc64le" not found
Error from server (NotFound): error when deleting "https://raw.githubusercontent.com/coreos/flannel/master/Documentation/kube-flannel.yml": daemonsets.apps "kube-flannel-ds-s390x" not found
Solution were to change the sequence of steps, first reinstall kubernetes environment after that redeploy flannel over broken one and only then delete it.
kubeadm reset
systemctl daemon-reload && systemctl restart kubelet
kubeadm init --pod-network-cidr=10.244.0.0/16
kubectl apply -f https://raw.githubusercontent.com/coreos/flannel/master/Documentation/kube-flannel.yml
kubectl delete -f https://raw.githubusercontent.com/coreos/flannel/master/Documentation/kube-flannel.yml
Note: You may need also manually unload flannel driver which is the vxlan module:
rmmod vxlan

Related

When applying "helm upgrade", ingress nginx says failed calling webhook. (details below)

UPGRADE FAILED: Internal error occurred: failed calling webhook "validate.nginx.ingress.kubernetes.io": Post : x509: certificate signed by unknown authority
this is the exact error which comes when I am using helm upgrade.
tried to apply the previous local values file to helm upgrade. did not work
Running the following command fixed the problem. I am unable to find the root cause of the same
kubectl delete -A ValidatingWebhookConfiguration ingress-nginx-admission

Impossible to connect to a mysql Cleardb database on Heroku

My last build failed with this error message:
Executing script cache:clear [KO]
[KO]
Script cache:clear returned with error code 255
!!
!! In ExceptionConverter.php line 117:
!!
!! An exception occurred in the driver: SQLSTATE[HY000] [1226] User 'xxxxxxxx
!! xxxxx' has exceeded the 'max_user_connections' resource (current value: 15)
And when I try to connect to my database via CLI,
mysql -u xxxxxxxxxx -pxxxxxxxx -h us-cdbr-east-xxx.cleardb.com
I am getting this error message:
ERROR 1040 (HY000): Too many connections
The problem is that the dashboard of the database says : No connections are currently established to the database. Therefore, I guess that a hidden process might be running.
Do you have an idea on how to fix this issue? I have already restarted all the dynos but it didn't have any effect. Is restarting the dynos and restarting the app the same? I also read that I should stop background workers, but I have no clue on how to do this...

Upgrading R gives error - Failed to connect to Mir: Failed to connect to server socket: No such file or directory

I'm currently using R version 3.6.1 and I'm trying to update it to R/4.2. I tried following instructions here and here. But everytime i try sudo add-apt-repository 'deb https://cloud.r-project.org/bin/linux/ubuntu focal-cran40/, I'm getting this error
Failed to connect to Mir: Failed to connect to server socket: No such file or directory
Unable to init server: Could not connect: Connection refused
Failed to connect to Mir: Failed to connect to server socket: No such file or directory
Unable to init server: Could not connect: Connection refused
How do I resolve this ?

Symfony 2: [PDOException] SQLSTATE[HY000] [2002] Connection refused entity generator

Recently I started working with Symfony. I created a project with the terminal/composer under the name "symfony" and also created a database on phpmyadmin (MAMP) which I called "symfony". I installed the project, and except a error of my timezone, my project was succesfully created and was running at my localhost.
After that I created a bundle called "SymfonyCinemaBundle" and my bundle was generated succesfully. I also tried to generate a entity but that is not working for me, and also the problem. After I open up the generator with the command, It asks for a shortcut name and I tried to use "SymfonyCinemaBundle:Movie" but that isn't working and gives me the following error:
*The Entity shortcut name: SymfonyCinemaBundle:Movie
[Doctrine\DBAL\Exception\ConnectionException]
An exception occured in driver: SQLSTATE[HY000] [2002] Connection refused
[Doctrine\DBAL\Driver\PDOException]
SQLSTATE[HY000] [2002] Connection refused
[PDOException]
SQLSTATE[HY000] [2002] Connection refused
doctrine:generate:entity [--entity ENTITY] [--fields FIELDS] [--format FORMAT] [--with-repository]*
I checked my parameters.yml but thats seems to be right. I've looked on the internet but nothing seems to help unfortunately. Does anyone has a solution for me?
Note: I'm using MAMP. The difference between normal and developers mode has no difference.
Solved:
I've changed the host in parameters.yml to localhost instead of 127.0.0.1. I also added the right port number (normally it doesn't matter) and that solves the problem but has given me another error instead: "No such file or directy". It had to do with my mysql.sock so I used the following commands in my terminal:
sudo mkdir /var/mysql
sudo ln -s /Applications/MAMP/tmp/mysql/mysql.sock /var/mysql/mysql.sock
sudo chown _mysql /var/mysql/mysql.sock
sudo chmod 777 /var/mysql/mysql.sock

Rstudio-server unable to connect to service and locale error

I am having issues connecting to a rstudio server I just installed. Can you please let me know if you know how to solve this? Thanks!
I just installed Rstudio server 0.99.485 64-bit on Ubuntu 13.10 (saucy) and am getting this error below:
The error in /var/log/syslog says:
ERROR Unexpected exception: locale::facet::Screateclocale name not valid;
LOGGED FROM: int main(int, char* const*) /home/ubuntu/rstudio/src/cpp/session/SessionMain.cpp:3166
The symptom is that the web UI says it's "unable to connect to service"
I have followed everything mentioned on this post, but it doesn't seem to work.
When I trace the rstudio-server process using sudo strace -f -e 'trace=!clockgettime,gettimeofday,futex,timerfdsettime,epollwait,epollctl' -p 10208 -o trace.txt, I am seeing this in the trace.txt ( below is what I used to log in:
10226 connect(10, {safamily=AFLOCAL, sunpath="/tmp/rstudio-rsession/"}, 28) = -1 ECONNREFUSED (Connection refused)
I've tried logged in using an invalid id to confirm that pam authentication is working fine
Also looked at this question and made sure there exists /home/<USERID> but still the problem is there.

Resources