etcdctl: unknown command "save" for "etcdctl" [closed] - kubernetes

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed last year.
Improve this question
I entered the etcd container:
kubectl -n kube-system exec -it etcd-k8scp -- sh
The I try to backup the container like explained in the K8s docs
ETCDCTL_API=3 etcdctl --endpoints $ENDPOINT snapshot save snapshotdb
I get this error:
Error: unknown command "save" for "etcdctl"
What's wrong with my command?

I forgot to set $ENDPOINT.
If it is empty, then etcdctl gets this:
ETCDCTL_API=3 etcdctl --endpoints snapshot save snapshotdb
etcdctl thinks I want to address the endpoint called "snapshot" and execute the command "save"
:-)

Related

Error message when creating a postgresql container using Podman [closed]

Closed. This question is not about programming or software development. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 13 days ago.
Improve this question
I am unable to create a postgress container using Podman in Ubuntu from why Windows terminal and I don't know why.
this is my command :
podman pod create --name postgress-container -p 8080:8080
this is the message I get:
"Error: repository name must have at least one component"
You are probably missing the image name postgres:<version>
Also podman pod is not the right command to create a container. Pods provide Infrastructure for containers. Read more here: https://developers.redhat.com/blog/2019/01/15/podman-managing-containers-pods
In your case i would run something like this:
podman create -it --name postgress-container -p 8080:8080 postgres:15.1
but if you start this container it won't run, because you need to set initial postgres password, like so:
podman create -it --name postgress-container -e POSTGRES_PASSWORD=mysecretpassword -p 8080:8080 postgres:15.1
or better formatted:
podman create -it --name postgress-container \
-e POSTGRES_PASSWORD=mysecretpassword \
-p 8080:8080 \
postgres:15.1
See also docs from postgesql on dockerhub: https://hub.docker.com/_/postgres/
Most docker commands can be made to docker commands by replacing docker with podman.

How to change Postgres database username from inside the pod? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 2 years ago.
Improve this question
I want to change my Postgres database username and password for the running pod.
I am able to change the password but how to change the username?
Connect to the pod:
kubectl exec -it <pod-name> bash
Run psql
# psql
psql>
Create the user:
CREATE USER name CREATEUSER;
ALTER USER name WITH PASSWORD 'your-password';
or simply run createuser from the pod:
# createuser --aduser name

How to resolve scheduler and controller-manager unhealthy state in Kubernetes [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 2 years ago.
Improve this question
Symptom:
When we install the new kubernetes cluster. When we execute the following command:
$ kubectl get cs / kubectl get componentstatuses
we get this error:
Warning: v1 ComponentStatus is deprecated in v1.19+
NAME STATUS MESSAGE ERROR
controller-manager Unhealthy Get "http://127.0.0.1:10252/healthz": dial tcp 127.0.0.1:10252: connect: connection refused
scheduler Unhealthy Get "http://127.0.0.1:10251/healthz": dial tcp 127.0.0.1:10251: connect: connection refused
etcd-0 Healthy {"health":"true"}
Solution:
Modify the following files on all master nodes:
$ sudo vi /etc/kubernetes/manifests/kube-scheduler.yaml
Clear the line (spec->containers->command) containing this phrase: - --port=0
$ sudo vi /etc/kubernetes/manifests/kube-controller-manager.yaml
Clear the line (spec->containers->command) containing this phrase: - --port=0
$ sudo systemctl restart kubelet.service
Another reason for this problem:
You may have used http_proxy in the docker setting. In this case, you must set address of the master nodes addresses in no_proxy

How to create multiple directory inside docker volume [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 3 years ago.
Improve this question
Actually i need to create directories inside volume & have to use that directories to mount container.
i need example commands for this.?
mkdir ~/first
mkdir ~/second
touch ~/first/file1
touch ~/second/file2
docker run -it -v ~/first:/first -v ~/second:/second ubuntu find / -name file*`
/second/file2
/first/file1
using this you can mount multiple files in an containers

supervisord http://localhost:9001 refused connection [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 3 years ago.
Improve this question
Despite much effort trying all solutions posted on stackoverflow, I still cannot manage solving this.
The problem (Case 1):
$ sudo supervisorctl -c /app/vpn_bot/supervisord.conf
http://localhost:9001 refused connection
Case 2:
$ sudo supervisorctl -c /app/vpn_bot/supervisord.conf
unix:///tmp/supervisorctl.sock refused connection
Here is the relevant supervisord.conf file:
[supervisord]
# nodaemon=true
[supervisorctl]
# case 1: serverurl=http://127.0.0.1:9001
serverurl=unix:///tmp/supervisorctl.sock # case 2
[unix_http_server]
file=/tmp/supervisorctl.sock
[inet_http_server]
port=127.0.0.1:9001
[rpcinterface:supervisor]
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface
I have made sure sudo supervisord -c /app/vpn_bot/supervisord.conf is running, and port 9001 is not used by any other process.
Any one can offer some help here?