Closed fahadshery closed 4 weeks ago
Launch CentOS 9 pod with root privilege and debug your connectirivity.
$ kubectl -n awx run debug-centos --restart=Never -it --rm --command /usr/bin/bash --image=quay.io/centos/centos:stream9
If you don't see a command prompt, try pressing enter.
[root@debug-centos /]#
You can install any packages with dnf
command for debugging, e.g. iproute
, openssh-clients
.
You can install any packages with
dnf
command for debugging, e.g.iproute
,openssh-clients
.
thanks, this was really useful.
I'm using a corporate proxy. Once this pod was launched, I can't run anything apparently i.e. dnf install iputils
would just be stuck at:
CentOS Stream 9 - BaseOS [ === ] --- B/s | 0 B --:-- ETA
my
/etc/environment
and /etc/systemd/system/k3s.service.env
files looks like this:
HTTPS_PROXY="http://corporate.proxy.com:8080"
HTTP_PROXY="http://corporate.proxy.com:8080"
NO_PROXY="127.0.0.1,localhost,IPv4_ADDRESS_OF_AWX_VM,IPv6_ADDRESS_OF_AWX_VM
So looks fine but I feel like it must be the routing issue...any ideas?
ok I have resolved it... if you're behind a corporate proxy then within the debug pod, just export the proxy using:
export HTTPS_PROXY=http://corporate.proxy.com:8080
export HTTP_PROXY=http://corporate.proxy.com:8080
this will enable proxy for the debug-pod
and you will be able to install any software. 👍
I tried two ways to sort out the IPv6 routing.
cluster-cidr
and service-cidr
but I was getting an error of cluster-cidr
mask needs to be less than to the node-ip mask.cafe
ipv6 networks and since I was using the dual stack
. I enabled the --flannel-ipv6-masq
option. This fixed the issue.The last question:
I tend to run shell
commands in ansible playbooks. There are some packages missing such as netcat
or expect
when executing those playbooks. How and where to include these packages so that awx has access to these?
Many thanks for your support.
@fahadshery Hi, sorry for the late reply, I haven't been feeling well and couldn't find the time to respond. Anyway glad to hear that you can run your job on IPv6 👍
I tend to run shell commands in ansible playbooks. There are some packages missing such as netcat or expect when executing those playbooks. How and where to include these packages so that awx has access to these?
Your playbook is launched in the execution environment. So you should install required packages in your EE image by using Ansible Builder, push the image, and specify it for your job template. To build customized EE images, refer to the guide for Ansible Builder.
I'm closing this issue but feel free to create new issue here or open new topic on the Ansible Community Forum if you have trouble during building custom EE image by Ansible Builder. Thanks!
Environment
Description
I have enabled the dual stack using the following command:
This gives me the following:
I can also see the IPv4 and IPv6 assigned to the pods:
I can
exec
into the pods and they can communicate using IPv6 addresses but I am unable to connect to remote hosts using ssh...(getting connection timeout)PING
is not installed inside the pods and I can't sudo install anything (asks for root password).Whereas from the host machine, I can ssh into the remote nodes without any issues...
Any ideas how to resolve?