consul-cli | Command line interface to Consul HTTP API | REST library
kandi X-RAY | consul-cli Summary
kandi X-RAY | consul-cli Summary
Command line interface to Consul HTTP API
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of consul-cli
consul-cli Key Features
consul-cli Examples and Code Snippets
Community Discussions
Trending Discussions on consul-cli
QUESTION
I am creating a 3-node cluster inside an Ubuntu VM running on my Mac using Kind. They work as they should:
...ANSWER
Answered 2020-Jan-15 at 14:04I replicated your setup creating 3 node cluster (1 master and 2 workers) and deployed consul with helm and saw the same thing as you see. All pods were running beside one that was pending.
In statefulset object you can see there is podAntiAffinity which disallows scheduling 2 or more server pods on the same node. This is why You see one pod in pending state.
There are 4 ways I come up with you can make it work.
Master node has a taint:
node-role.kubernetes.io/master:NoSchedule
which disallows scheduling any pods on master node. You can delete this taint by running:kubectl taint node kind-control-plane node-role.kubernetes.io/master:NoSchedule-
(notice minus sign, it tells k8s to delete the taint) so now scheduler will be able to schedule the one consul-server pod that's left to this node.You can add one more worker node.
You can remove podAntiAffinity from consul-server statfulset object so scheduler won't care where pods get scheduled.
Change
requiredDuringSchedulingIgnoredDuringExecution
topreferredDuringSchedulingIgnoredDuringExecution
so this affinity rule does not need to be fulfilled, it's only preferred.
Let me know if it helped.
QUESTION
I want to use REST Protocol in my services. For this, I enabled Rest Protocol and trying to get TGT. Also, all examples were based on generic service registration which I don't want in prod environment.
Here is the generic service registry example that should not be used in prod environment. And I did not use this in my environment:
...ANSWER
Answered 2019-Dec-18 at 14:37Any idea, solution? I don't want to allow everyone able to create TGT, I can add service definition that only matches with CAS prefix also but first it is better to understand if I miss something or if this is a bug.
You're not missing anything. This sounds like a bug to me. As a workaround, I would add the service definition that matches the CAS prefix for now.
It sounds like this problem likely only manifests itself because you're using this:
QUESTION
What configuration is required to achieve this?
It's possible using the "development mode" mentioned here - https://learn.hashicorp.com/consul/getting-started/agent (but not recommended for production).
I've tried setting this up but I'm not sure how to set the client config. What I've tried is a config of:
...ANSWER
Answered 2019-Sep-20 at 12:47No "client" agent is required to run for an operational Consul cluster.
I had to set this server / master with the bootstrap_expect
set to 1
(number of nodes for boostrap process):
QUESTION
I guess the main purpose of a cluster is failure tolerance. However, when I start the following consul cluster, it is not the case and I don't understand why.
...ANSWER
Answered 2019-Sep-03 at 08:01The thing with consul is that at some point it wants to reach a quorum to be able to do proper leadership elections. For your servers you're using the -bootstrap-expect 2
to essentially tell the server to expect two nodes before starting the leadership election.
If you only have 2 nodes, and one is failing(or broken) you'll end up with a split brain situation. The node that is left over, doesn't have enough other nodes left to be able to decide who should be the leader inside the cluster. As a result it will not accept any new registrations.
My expectation is, that if you have a cluster of 3 nodes, and one fails, it should be able to continue running. Generally with cluster setups an un-even number of nodes is a good idea and generally (clustersize/2) >= 2
QUESTION
I'm implementing a service-discovery solution following the discovery SPI provided in spring-cloud-commons abstractions
For auto-registration, there is a builtin spring configuration property:
...ANSWER
Answered 2019-Jan-09 at 18:39If you have a management port setup (actuators running on a separate port). You can register the management as a separate service that can be discovered.
So if you register a userservice
and have set management.server.port=8081
then there will be a service registered (userservice-management
) whose port is 8081 and the same host has the userservice
instance.
QUESTION
I am using Consul-Template to render a properties with the data gathered from Consul. The files are being rendered successfully but afterwards Consul-Template fails over and over again until it crashes:
...ANSWER
Answered 2018-Jan-24 at 03:55Cause: You have a proxy or a load balancer between your consul-template and consul.
Workaround: Increase your load balancer or proxy timeout for idle connections to something above 60sec (e.g: 65sec or 120sec) because after that keepalive will kick in and will keep the connection alive :)
Details
- HTTP 504 is a gateway timeout that means the connection has been "cut" or that the service became unresponsive but I will assume that your consul cluster is still working therefore it is due to an active network device in middle (between consul-template and consul)
- Consul-template opens long lasting connections to listen for changes. Therefore if the connection is silently killed by a load balancer you end up with these 504 errors.
- These messages are benign because consul-template reconnects fine. However they are annoying and will fill your logs and disk space with the same warning over and over ;-)
- If in AWS, set your ELB idle timeout to 65sec and these messages will go away
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install consul-cli
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page