Skip to content

Commit c95e327

Browse files
committed
better formatting for hybrid proxy config
1 parent 548276f commit c95e327

File tree

1 file changed

+29
-22
lines changed

1 file changed

+29
-22
lines changed

latest/ug/nodes/hybrid-nodes-proxy.adoc

Lines changed: 29 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -26,23 +26,27 @@ Create a file on each hybrid node called `http-proxy.conf` in the `/etc/systemd/
2626
[source,yaml,subs="verbatim,attributes,quotes"]
2727
----
2828
[Service]
29-
Environment="HTTP_PROXY=http://proxy-domain:port"
30-
Environment="HTTPS_PROXY=http://proxy-domain:port"
29+
Environment="HTTP_PROXY=http://[.replaceable]#proxy-domain:port#"
30+
Environment="HTTPS_PROXY=http://[.replaceable]#proxy-domain:port#"
3131
Environment="NO_PROXY=localhost"
3232
----
33-
==== From userdata
34-
The `containerd.service.d` directory will need to be created for this file. You will need to reload systemd to pick up the configuration file without a reboot. In AL2023, the service will likely already be running when your script executes, so you will also need to restart it.
35-
[source,yaml,subs="vabatim,attributes,quotes"]
33+
34+
==== `containerd` configuration from user data
35+
36+
The `containerd.service.d` directory will need to be created for this file. You will need to reload systemd to pick up the configuration file without a reboot. In AL2023, the service will likely already be running when your script executes, so you will also need to restart it.
37+
38+
[source,yaml,subs="verbatim,attributes,quotes"]
3639
----
3740
mkdir -p /etc/systemd/system/containerd.service.d
3841
echo '[Service]' > /etc/systemd/system/containerd.service.d
39-
echo 'Environment="HTTP_PROXY=http://proxy-domain:port"' >> /etc/systemd/system/containerd.service.d
40-
echo 'Environment="HTTPS_PROXY=http://proxy-domain:port"' >> /etc/systemd/system/containerd.service.d
42+
echo 'Environment="HTTP_PROXY=http://[.replaceable]#proxy-domain:port#"' >> /etc/systemd/system/containerd.service.d
43+
echo 'Environment="HTTPS_PROXY=http://[.replaceable]#proxy-domain:port#"' >> /etc/systemd/system/containerd.service.d
4144
echo 'Environment="NO_PROXY=localhost"' >> /etc/systemd/system/containerd.service.d
4245
systemctl daemon-reload
4346
systemctl restart containerd
4447
----
45-
=== Kubelet proxy configuration
48+
49+
=== `kubelet` proxy configuration
4650

4751
`kubelet` is the Kubernetes node agent that runs on each Kubernetes node and is responsible for managing the node and pods running on it. If you are using a proxy in your on-premises environment, you must configure the `kubelet` so it can communicate with your Amazon EKS cluster's public or private endpoints.
4852

@@ -51,18 +55,21 @@ Create a file on each hybrid node called `http-proxy.conf` in the `/etc/systemd/
5155
[source,yaml,subs="verbatim,attributes,quotes"]
5256
----
5357
[Service]
54-
Environment="HTTP_PROXY=http://proxy-domain:port"
55-
Environment="HTTPS_PROXY=http://proxy-domain:port"
58+
Environment="HTTP_PROXY=http://[.replaceable]#proxy-domain:port#"
59+
Environment="HTTPS_PROXY=http://[.replaceable]#proxy-domain:port#"
5660
Environment="NO_PROXY=localhost"
5761
----
58-
==== From userdata
59-
The `kubelet.service.d` directory will need to be created for this file. You will need to reload systemd to pick up the configuration file without a reboot. In AL2023, the service will likely already be running when your script executes, so you will also need to restart it.
60-
[source,yaml,subs="vabatim,attributes,quotes"]
62+
63+
==== `kubelet` configuration from user data
64+
65+
The `kubelet.service.d` directory must be created for this file. You will need to reload systemd to pick up the configuration file without a reboot. In AL2023, the service will likely already be running when your script executes, so you will also need to restart it.
66+
67+
[source,yaml,subs="verbatim,attributes,quotes"]
6168
----
6269
mkdir -p /etc/systemd/system/kubelet.service.d
6370
echo '[Service]' > /etc/systemd/system/kubelet.service.d
64-
echo 'Environment="HTTP_PROXY=http://proxy-domain:port"' >> /etc/systemd/system/kubelet.service.d
65-
echo 'Environment="HTTPS_PROXY=http://proxy-domain:port"' >> /etc/systemd/system/kubelet.service.d
71+
echo 'Environment="HTTP_PROXY=http://[.replaceable]#proxy-domain:port#"' >> /etc/systemd/system/kubelet.service.d
72+
echo 'Environment="HTTPS_PROXY=http://[.replaceable]#proxy-domain:port#"' >> /etc/systemd/system/kubelet.service.d
6673
echo 'Environment="NO_PROXY=localhost"' >> /etc/systemd/system/kubelet.service.d
6774
systemctl daemon-reload
6875
systemctl restart containerd
@@ -78,16 +85,16 @@ If you are using a proxy for internet access, you must configure your operating
7885
+
7986
[source,yaml,subs="verbatim,attributes,quotes"]
8087
----
81-
sudo snap set system proxy.https=http://proxy-domain:port
82-
sudo snap set system proxy.http=http://proxy-domain:port
88+
sudo snap set system proxy.https=http://[.replaceable]#proxy-domain:port#
89+
sudo snap set system proxy.http=http://[.replaceable]#proxy-domain:port#
8390
----
8491

8592
. To enable proxy for `apt`, create a file called `apt.conf` in the `/etc/apt/` directory. Replace proxy-domain and port with the values for your environment.
8693
+
8794
[source,yaml,subs="verbatim,attributes,quotes"]
8895
----
89-
Acquire::http::Proxy "http://proxy-domain:port";
90-
Acquire::https::Proxy "http://proxy-domain:port";
96+
Acquire::http::Proxy "http://[.replaceable]#proxy-domain:port#";
97+
Acquire::https::Proxy "http://[.replaceable]#proxy-domain:port#";
9198
----
9299

93100
*Amazon Linux 2023 and Red Hat Enterprise Linux*
@@ -96,7 +103,7 @@ Acquire::https::Proxy "http://proxy-domain:port";
96103
+
97104
[source,yaml,subs="verbatim,attributes,quotes"]
98105
----
99-
proxy=http://proxy-domain:port
106+
proxy=http://[.replaceable]#proxy-domain:port#
100107
----
101108

102109
== Cluster wide configuration
@@ -127,9 +134,9 @@ containers:
127134
- --config=/var/lib/kube-proxy-config/config - --hostname-override=$(NODE_NAME)
128135
env:
129136
- name: HTTP_PROXY
130-
value: http://proxy-domain:port
137+
value: http://[.replaceable]#proxy-domain:port#
131138
- name: HTTPS_PROXY
132-
value: http://proxy-domain:port
139+
value: http://[.replaceable]#proxy-domain:port#
133140
- name: NODE_NAME
134141
valueFrom:
135142
fieldRef:

0 commit comments

Comments
 (0)