Comments (4)
@everydaylearner
Hi, thanks for using my guide :)
Where can i change the port number? say i want to run on port 8443 rather than default port 80?
You mean, your AWX is already accesible via HTTP over 80 and HTTPS over 443, but you want to use HTTPS over 8443 instead, right?
from awx-on-k3s.
yes correct, i want to run over 8443
Thank you!
from awx-on-k3s.
Okay, so you should to know the port 8443 on your K3s host is already used by Traefik by default, to route HTTPS traffic internally.
$ kubectl -n kube-system get deployment traefik -o=jsonpath='{.spec.template.spec.containers[0].ports}' | jq
...
{
"containerPort": 8443,
"hostPort": 8443, 👈👈👈
"name": "websecure",
"protocol": "TCP"
}
...
Traefik has the feature called EntryPoints to expose custom ports, but 8443 can't be used due to this confliction.
So, there are two way to achieve your requirements.
- Expose 8443 that Traefik uses internally to the host network.
- Change internal port for Traefik from 8443, and then create custom EntryPoints.
The method 1 is a bit dirty and un-secure since unintended ports such as 8000, 9000, 9100 will also be exposed, but simple.
# Create custom configuration file for Traefik
sudo tee /var/lib/rancher/k3s/server/manifests/traefik-config.yaml <<EOF
---
apiVersion: helm.cattle.io/v1
kind: HelmChartConfig
metadata:
name: traefik
namespace: kube-system
spec:
valuesContent: |-
hostNetwork: true
EOF
# Then wait until your traefik by the following command is 1/1 READY.
kubectl -n kube-system get deployment traefik
Now your 8443 is accessible via HTTPS
Method 2 is a bit complicated and there might be some side effects.
# Create custom configuration file for Traefik
sudo tee /var/lib/rancher/k3s/server/manifests/traefik-config.yaml <<EOF
---
apiVersion: helm.cattle.io/v1
kind: HelmChartConfig
metadata:
name: traefik
namespace: kube-system
spec:
valuesContent: |-
ports:
websecure:
port: 8442
expose: true
exposedPort: 443
protocol: TCP
tls:
enabled: true
mywebsecure:
port: 8443
expose: true
exposedPort: 8443
protocol: TCP
tls:
enabled: true
entryPoints:
mywebsecure:
address: ":8443"
EOF
# Then wait until your traefik by the following command is 1/1 READY.
kubectl -n kube-system get deployment traefik
from awx-on-k3s.
thank you very much! Appreciate it! It helps to understand better. I think i need to read more on traefik.
from awx-on-k3s.
Related Issues (20)
- TODO: Bump Galaxy Operator version to 2024.5.8
- awx-web pod going into CrashLoopBackoff with Operator 2.16.1 HOT 2
- how to enable ipv6? HOT 8
- TODO: Bump AWX Operator version to 2.17.0
- Frontend doesn't work HOT 6
- Yet another IPv6 question, dual stack k3s cluster, unable to route traffic to remote node HOT 5
- AWX tower URL redirection HOT 1
- Unable to send stdout from AWX to pod instance HOT 1
- TODO: Bump AWX Operator version to 2.18.0
- Authentication failed for Git repository - azure DevOps HOT 1
- How to use dynamic inventory from Netbox into AWX UI? HOT 10
- Possibility of execution instance(worker node) on another node/host/agent HOT 7
- TODO: Bump AWX Operator version to 2.19.0
- TODO: Bump AWX Operator version to 2.19.1
- Reverse proxy from docker traefik to AWX on same host HOT 2
- Change tls crt and key HOT 3
- How can I deploy a awx-on-k3s on many nodes HOT 2
- Where can files be stored so that they can be used in playbooks? HOT 6
- How to install awx on microk8s? HOT 1
- Unable to add custom CA using mount host filesystem option HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from awx-on-k3s.