This message was deleted.
# general
a
This message was deleted.
h
A good approach would be from the CLI in my opinion. You can do something like this: rancher kubectl get nodes -o jsonpath='{range .items[*]}{.metadata.name}{"\n"}{end}'. After you identify which node you want to add the env variable. rancher kubectl patch node name_of_node -p '{"spec":{"config":{"kubeletConfig":{"environment":{"HTTP_PROXY":"http://your-proxy:PORT"}}}}}'
Make sure to login first rancher login rancher_url --token api-token
b
without http proxy, Kubernetes is not installed in Harvester VMs because the VM is trying to access ntp endpoints..
we would like to configure from UI the same thing as https://docs.rke2.io/advanced#configuring-an-http-proxy
h
And you want to set this variable for all provisioned machines in rancher's harvester?.
b
yes, you’re right
h
Well in that case you can access the rancher ui and log in to the harvester cluster. Then navigate to the "Clusters" tab and select the cluster for which you want to set the HTTP_PROXY variables -> Click on the cluster name to enter the cluster details page. -> In the left sidebar, click on "Nodes" to view the list of nodes in the cluster. -> Select the nodes for which you want to set the HTTP_PROXY variable. -> Once you have selected the nodes, click on the "More" button at the top of the nodes list and choose "Edit".
b
I’m not able to find the “Nodes” tab on Rancher v2.7.4
h
In the "Edit Nodes" dialog box, locate the "Environment Variables" section. -> Click on the "Add" button to add a new environment variable. -> In the "Name" field, enter "HTTP_PROXY". -> In the "Value" field, enter the URL of your HTTP proxy server. -> Click "Save" to apply the changes.
Then rancher will automatically update the environment variables for the selected nodes, and the HTTP_PROXY value will be set accordingly.
b
I’m deploying the cluster on Harvester
h
Umm, you are right I think there were changes on 2.7.4 let me check that.
b
I’ve tried to put the Environment Variables here but it doesn’t seem to work.
h
That's for the agents
Hold on
Let me pull up mine.
👍 1
Ok can you navigate to the "Clusters" tab and select the harvester cluster where you are deploying the cluster.
Then go to the details page
You should see the Projects tab. Select the project where you want to set the variables.
b
where is the projects tab?
h
Within that project, click on Add and choose Deployment.
Hmm, that's not a healthy cluster from what I can see in the picture. 🤣
👍 1
b
yes, because the network where was deployed does not have internet access, that’s why I’m trying to setup an HTTP_PROXY
h
Gotcha, then you to the Project tab. Did you see it?.
Then when there, click on Add and choose Deployment as I said.
b
no, in the above screenshot there is no Project tab unfortunetly
👀 1
h
Make sure to provide the necessary details for the deployment, container image, ports, etc.
Hey did you select the cluster?
b
please give me a screenshot, it seems that we’re talking about different things
h
Is right where you at just click on the cluster name I guess.
👍 1
b
if you still have any ideas, please let me know, thank you
For anyone looking to deploy RKE2 using Rancher in an air-gapped environment (using HTTP_PROXY) here are what worked for us: https://gist.github.com/iosifnicolae2/6ca3b2b6c4dcbb1bc5cec6863ac9a203