I'm working for access and monitor my Kubernetes Cluster . So I started the kubernetes proxy for access the external browsers or etc.
This is command I've runned for find the APISERVER's
APISERVER=$(kubectl config view | grep server | cut -f 2- -d ":" | tr -d " ")
That is the results shown as below .
server: https://<external_ip_0>
server: https://<external_ip_1>
server: https://<external_ip_2>
server: https://<external_ip_3>
when I want to access the my proxy any ip at above. I got timeout and any response from anywhere .How I can handle this problem ?
Which one is the TRUE APISERVER ip ?
Notice : That is the my command for run the kubernetes proxy . I want to access apiserver via kubectl proxy.
kubectl proxy --address 0.0.0.0 --accept-hosts '.*' --port=8080 &
command kubectl config view shows your kubectl config where you can have multiple clusters configured so that's why you are receiving multiple "server" when greping - those are some Kubernetes clusters which you used in past. See https://kubernetes.io/docs/tasks/access-application-cluster/configure-access-multiple-clusters/
If you want to access Kubernetes API exposed by proxy you can issue proxy command which you provided and go under http://localhost:8080/api/ in your web browser to see Kubernetes API - more information there: https://kubernetes.io/docs/tasks/access-kubernetes-api/http-proxy-access-api/
Related
So I did the following:
minikube dashboard
kubectl proxy
And it says Starting to serve on 127.0.0.1:8001, however this port is not open on my VM (not included in my firewall rules)
then how am I able to access it via ssh tunneling?
Basically I did this:
ssh -L 12345:localhost:8001 myLogin#myRemoteServer
And then accessed it as:
http://localhost:12345/api/v1/namespaces/kubernetes-dashboard/services/http:kubernetes-dashboard:/proxy/#/pod?namespace=default
I find this helpful kubectl proxy --address='0.0.0.0' --disable-filter=true
I want to test the server for AJAX request before pushing my code. I am running a docker server using the command docker-compose -f docker-compose-withdb.yml up. But I don't know what's the API I have to make requests to for testing it locally.
This is the output snippet I am getting after docker-compose up:
taskmaster_1 |
taskmaster_1 | Waiting for rabbitmq:5672 to become available ... done
taskmaster_1 | rm: could not remove directory (code EBUSY): /tmp/runbox
rabbitmq_1 | 2019-05-22 08:02:48.857 [info] <0.657.0> accepting AMQP connection <0.657.0> (172.19.0.9:49598 -> 172.19.0.3:5672)```
I have tried making requests to localhost:5672 and 172.19.0.9:49598.
You should map your api ports to Host. check docker-compose to see if there is a line like this:
ports:
- 80:8080
which the first one is host port and the second one is container port.
I cannot access my Cassandra database, deployed on the same namespace in kubernetes.
My service has no cluster IP but an internal endpoint cassandra.hosting:9042 but whenever I try to connect from an internal spring application using
spring.data.cassandra.contact-points=cassandra.hosting
it fails with the error All host(s) tried for query failed
How did you configure your endpoint? Generally, all services and pods in a Kubernetes cluster are discoverable through a standard DNS notation. It looks like this:
<service-name>.<namespace>.svc.cluster.local # or
<pod-name>.<namespace>.svc.cluster.local # or
<pod-name>.<subdomain>.<namespace>.svc.cluster.local
If you are within the same namespace this would work too:
<service-name>
<pod-name>
<pod-name>.<subdomain>
I would also check either core-dns or kube-dns are running and ready:
kubectl -n kube-system get pods | grep dns
I am trying to play around with kubernetes and specifically the REST API. The steps to connect with the cluster API are listed here. However Im stuck in the first step i.e. running kubectl proxy
I try running this:
kubectl --context='vagrant' proxy --port=8080 &
which returns error: couldn't read version from server: Get https://172.17.4.99:443/api: dial tcp 172.17.4.99:443: i/o timeout
What does this mean? How do overcome it connect to the API?
Check that your docker, proxy, kube-apiserver, kube-control-manager services are running without error. Check their status using systemclt status your-service-name. If the service is loaded but not running then restart the service by using systemctl restart your-service-name.
I have installed Cloud 9 IDE on my server, but I can't access to it remotely.
info - socket.io started
Project root is: .
Trying to start your browser in: http://127.0.0.1:3000
Does Cloud 9 work only on local?
Yes, by default the Cloud9 webserver listens only to the localhost interface, to specify another address, just add the following argument to the command line: -l 0.0.0.0, e.g.
./cloud9.sh -l 0.0.0.0 -w ~/workspace