Skip to content

Commit 3248f18

Browse files
puneetsarnaciroque
authored andcommitted
Use a nicer command to tail pod logs
While what we have also works, labels is a nicer way to select k8s objects. ```shell nginx-loadbalancer-kubernetes $ kubectl -n nlk logs -f $(kubectl -n nlk get po -l "app=nlk" --no-headers -o custom-columns=":metadata.name") time="2024-02-28T20:35:49Z" level=info msg="Settings::Initialize" time="2024-02-28T20:35:49Z" level=info msg="Certificates::Initialize" time="2024-02-28T20:35:49Z" level=info msg="Certificates::Run" I0228 20:35:49.398213 1 shared_informer.go:273] Waiting for caches to sync for nlk-handler I0228 20:35:49.500005 1 shared_informer.go:280] Caches are synced for nlk-handler ```
1 parent 027aa9d commit 3248f18

File tree

1 file changed

+21
-21
lines changed

1 file changed

+21
-21
lines changed

README.md

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
[![CI](https://github.com/nginxinc/nginx-loadbalancer-kubernetes/actions/workflows/build-test.yml/badge.svg)](https://github.com/nginxinc/nginx-loadbalancer-kubernetess/actions/workflows/build-test.yml)
2-
[![Go Report Card](https://goreportcard.com/badge/github.com/nginxinc/nginx-loadbalancer-kubernetes)](https://goreportcard.com/report/github.com/nginxinc/nginx-loadbalancer-kubernetes)
3-
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
4-
[![GitHub release (latest SemVer)](https://img.shields.io/github/v/release/nginxinc/nginx-loadbalancer-kubernetes?logo=github&sort=semver)](https://github.com/nginxinc/nginx-loadbalancer-kubernetes/releases/latest) ![GitHub go.mod Go version](https://img.shields.io/github/go-mod/go-version/nginxinc/nginx-loadbalancer-kubernetes?logo=go)
1+
[![CI](https://github.com/nginxinc/nginx-loadbalancer-kubernetes/actions/workflows/build-test.yml/badge.svg)](https://github.com/nginxinc/nginx-loadbalancer-kubernetess/actions/workflows/build-test.yml)
2+
[![Go Report Card](https://goreportcard.com/badge/github.com/nginxinc/nginx-loadbalancer-kubernetes)](https://goreportcard.com/report/github.com/nginxinc/nginx-loadbalancer-kubernetes)
3+
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
4+
[![GitHub release (latest SemVer)](https://img.shields.io/github/v/release/nginxinc/nginx-loadbalancer-kubernetes?logo=github&sort=semver)](https://github.com/nginxinc/nginx-loadbalancer-kubernetes/releases/latest) ![GitHub go.mod Go version](https://img.shields.io/github/go-mod/go-version/nginxinc/nginx-loadbalancer-kubernetes?logo=go)
55
[![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/nginxinc/nginx-loadbalancer-kubernetes/badge)](https://api.securityscorecards.dev/projects/github.com/nginxinc/nginx-loadbalancer-kubernetes)
66
[![CodeQL](https://github.com/nginxinc/nginx-loadbalancer-kubernetes/workflows/codeql.yml/badge.svg?branch=main&event=push)](https://github.com/nginxinc/nginx-loadbalancer-kubernetes/actions/codeql.yml)
77
[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fnginxinc%2Fnginx-loadbalancer-kubernetes.svg?type=shield)](https://app.fossa.com/projects/git%2Bgithub.com%2Fnginxinc%2Fnginx-loadbalancer-kubernetes?ref=badge_shield)
@@ -44,7 +44,7 @@ NLK provides a simple, easy-to-manage way to automate load balancing for your Ku
4444

4545
NLK installs easily, has a small footprint, and is easy to configure and manage.
4646

47-
NLK does not require learning a custom object model, you only have to understand NGINX configuration to get the most out of this solution.
47+
NLK does not require learning a custom object model, you only have to understand NGINX configuration to get the most out of this solution.
4848
There is thorough documentation available with the specifics in the `docs/` directory.
4949

5050
### What does NLK do?
@@ -53,15 +53,15 @@ tl;dr:
5353

5454
_**NLK is a Kubernetes controller that monitors Services and Nodes in your cluster, and then sends API calls to an external NGINX Plus server to manage NGINX Plus Upstream servers automatically.**_
5555

56-
That's all well and good, but what does it mean? Kubernetes clusters require some tooling to handling routing traffic from the outside world (e.g.: the Internet, corporate network, etc.) to the cluster.
56+
That's all well and good, but what does it mean? Kubernetes clusters require some tooling to handling routing traffic from the outside world (e.g.: the Internet, corporate network, etc.) to the cluster.
5757
This is typically done with a load balancer. The load balancer is responsible for routing traffic to the appropriate worker node which then forwards the traffic to the appropriate Service / Pod.
5858

59-
If you are using a hosted Kubernetes solution -- Digital Ocean, AWS, Azure, etc. -- you can use the cloud provider's load balancer service. Those services will create a load balancer for you.
59+
If you are using a hosted Kubernetes solution -- Digital Ocean, AWS, Azure, etc. -- you can use the cloud provider's load balancer service. Those services will create a load balancer for you.
6060
You can use the cloud provider's API to manage the load balancer, or you can use the cloud provider's web console.
6161

6262
If you are running Kubernetes on-premise and will need to manage your own load balancer, NLK can help.
6363

64-
NLK itself does not perform load balancing. Rather, NLK allows you to manage Service resources within your cluster to update your load balancers, with tooling you are most likely already using.
64+
NLK itself does not perform load balancing. Rather, NLK allows you to manage Service resources within your cluster to update your load balancers, with tooling you are most likely already using.
6565

6666
<img src="docs/media/nlk-blog-diagram-v1.png" width="768" />
6767

@@ -70,7 +70,7 @@ NLK itself does not perform load balancing. Rather, NLK allows you to manage Ser
7070
There are few bits of administrivia to get out of the way before you can start leveraging NLK for your load balancing needs.
7171

7272
As noted above, NLK is intended for when you have one or more Kubernetes clusters running on-premise. In addition to this,
73-
you need to have at least one NGINX Plus host running outside your cluster (Please refer to the [Roadmap](#Roadmap) for information about other load balancer servers).
73+
you need to have at least one NGINX Plus host running outside your cluster (Please refer to the [Roadmap](#Roadmap) for information about other load balancer servers).
7474

7575
### Deployment
7676

@@ -92,20 +92,20 @@ You will need to update this ConfigMap to reflect the NGINX Plus hosts you wish
9292

9393
If you were to deploy the ConfigMap and start NLK without updating the `nginx-hosts` value, don't fear; the ConfigMap resource is monitored for changes and NLK will update the NGINX Plus hosts accordingly when the resource is changed, no restart required.
9494

95-
There is an extensive [Installation Reference](docs/README.md) available in the `docs/` directory.
95+
There is an extensive [Installation Reference](docs/README.md) available in the `docs/` directory.
9696
Please refer to that for detailed instructions on how to deploy NLK and run a demo application.
9797

9898
#### Versioning
9999

100-
Versioning is a work in progress. The CI/CD pipeline is being developed and will be used to build and publish NLK images to the Container Registry.
100+
Versioning is a work in progress. The CI/CD pipeline is being developed and will be used to build and publish NLK images to the Container Registry.
101101
Once in place, semantic versioning will be used for published images.
102102

103103
#### Deployment Steps
104104

105-
To get NLK up and running in ten steps or fewer, follow these instructions (NOTE, all the aforementioned prerequisites must be met for this to work).
105+
To get NLK up and running in ten steps or fewer, follow these instructions (NOTE, all the aforementioned prerequisites must be met for this to work).
106106
There is a much more detailed [Installation Reference](docs/README.md) available in the `docs/` directory.
107107

108-
1. Clone this repo (optional, you can simply copy the `deployments/` directory)
108+
1. Clone this repo (optional, you can simply copy the `deployments/` directory)
109109

110110
```git clone [email protected]:nginxinc/nginx-loadbalancer-kubernetes.git```
111111

@@ -127,35 +127,35 @@ There is a much more detailed [Installation Reference](docs/README.md) available
127127

128128
6. Check the logs
129129

130-
```kubectl -n nlk get pods | grep deployment | cut -f1 -d" " | xargs kubectl logs -n nlk --follow $1```
130+
```kubectl -n nlk logs -f $(kubectl -n nlk get po -l "app=nlk" --no-headers -o custom-columns=":metadata.name")```
131131

132-
At this point NLK should be up and running. Now would be a great time to go over to the [Installation Reference](docs/README.md)
132+
At this point NLK should be up and running. Now would be a great time to go over to the [Installation Reference](docs/README.md)
133133
and follow the instructions to deploy a demo application.
134134

135135
### Monitoring
136136

137-
Presently NLK includes a fair amount of logging. This is intended to be used for debugging purposes.
137+
Presently NLK includes a fair amount of logging. This is intended to be used for debugging purposes.
138138
There are plans to add more robust monitoring and alerting in the future.
139139

140140
As a rule, we support the use of [OpenTelemetry](https://opentelemetry.io/) for observability, and we will be adding support in the near future.
141141

142142
## Contributing
143143

144-
Presently we are not accepting pull requests. However, we welcome your feedback and suggestions.
144+
Presently we are not accepting pull requests. However, we welcome your feedback and suggestions.
145145
Please open an issue to let us know what you think!
146146

147147
One way to contribute is to help us test NLK. We are looking for people to test NLK in a variety of environments.
148148

149-
If you are curious about the implementation, you should certainly browse the code, but first you might wish to refer to the [design document](docs/DESIGN.md).
149+
If you are curious about the implementation, you should certainly browse the code, but first you might wish to refer to the [design document](docs/DESIGN.md).
150150
Some of the design decisions are explained there.
151151

152152
## Roadmap
153153

154154
While NLK was initially written specifically for NGINX Plus, we recognize there are other load-balancers that can be supported.
155155

156-
To this end, NLK has been architected to be extensible to support other "Border Servers".
157-
Border Servers are the term NLK uses to describe load-balancers, reverse proxies, etc. that run outside the cluster and handle
158-
routing outside traffic to your cluster.
156+
To this end, NLK has been architected to be extensible to support other "Border Servers".
157+
Border Servers are the term NLK uses to describe load-balancers, reverse proxies, etc. that run outside the cluster and handle
158+
routing outside traffic to your cluster.
159159

160160
While we have identified a few potential targets, we are open to suggestions. Please open an issue to share your thoughts on potential implementations.
161161

0 commit comments

Comments
 (0)