Skip to content

[Kubernetes] Add ability to Setup HA Kubernetes Master for Virtual Switch Testbed#2409

Merged
isabelmsft merged 7 commits intosonic-net:masterfrom
isabelmsft:cleaned_vtestbed_br1_2
Oct 30, 2020
Merged

[Kubernetes] Add ability to Setup HA Kubernetes Master for Virtual Switch Testbed#2409
isabelmsft merged 7 commits intosonic-net:masterfrom
isabelmsft:cleaned_vtestbed_br1_2

Conversation

@isabelmsft
Copy link
Contributor

@isabelmsft isabelmsft commented Oct 27, 2020

Description of PR

Summary:

This PR introduces the ability to setup a HA Kubernetes master on the same internal management network as used by the virtual switch testbed.

Type of change

  • Bug fix
  • Testbed and Framework(new/improvement)
  • Test case(new/improvement)

Approach

What is the motivation for this PR?

We need this to test Kubernetes features on the virtual switch testbed.

How did you do it?

  1. Added script to set up NAT for br1 internal management network, so Kubernetes master Ubuntu KVMs can reach internet
  2. Defined new ansible inventory file for Kubernetes VMs on internal management network
  3. Added DNS server IP configuration to Ubuntu KVms
  4. Updated k8s testbed README to describe steps to set up HA Master for virtual switch testbed
    Unrelated to this PR, I also adjusted a few permissions to fix an issue when setting up HA master by user with different permissions

How did you verify/test it?

  • Created HA Kubernetes master on internal k8s management network, using testbed-cli.sh script
  • Joined virtual switch to Kubernetes master on internal management network
  • Passed k8s/test_join_available_master.py on virtual switch vlab-01
isl@5222e4a8cc5a:/data/sonic-mgmt/tests$ ./run_tests.sh -d vlab-01 -n vms-kvm-t0 -f ../ansible/vtestbed.csv -i ../ansible/veos_vtb,../ansible/k8s_ubuntu_vtb -u -b 21_1 -c k8s/test_join_available_master.py 
=== Running tests in groups ===
/usr/local/lib/python2.7/dist-packages/ansible/parsing/vault/__init__.py:44: CryptographyDeprecationWarning: Python 2 is no longer supported by the Python core team. Support for it is now deprecated in cryptography, and will be removed in a future release.
  from cryptography.exceptions import InvalidSignature
========================================================================================= test session starts ==========================================================================================
platform linux2 -- Python 2.7.17, pytest-4.6.5, py-1.9.0, pluggy-0.13.1
ansible: 2.8.12
rootdir: /data/sonic-mgmt/tests, inifile: pytest.ini
plugins: html-1.22.1, forked-1.3.0, xdist-1.28.0, metadata-1.10.0, repeat-0.8.0, ansible-2.2.2
collected 1 item                                                                                                                                                                                       

k8s/test_join_available_master.py::test_join_available_master PASSED                                                                                                                             [100%]

------------------------------------------------------------------------ generated xml file: /data/sonic-mgmt/tests/logs/tr.xml ------------------------------------------------------------------------
====================================================================================== 1 passed in 328.99 seconds ======================================================================================

@isabelmsft isabelmsft changed the title Initial commit on cleaned branch 2 from noha [Kubernetes] Add ability to Setup HA Kubernetes Master for Virtual Switch Testbed Oct 27, 2020
@lguohan
Copy link
Contributor

lguohan commented Oct 27, 2020

ansible/.k8s_ubuntu_vtb.swp, let's remove it.

@isabelmsft isabelmsft marked this pull request as ready for review October 28, 2020 00:04
@isabelmsft isabelmsft requested a review from lguohan October 29, 2020 04:48
@lguohan
Copy link
Contributor

lguohan commented Oct 29, 2020

lgtm, please resolve the conflict.

@isabelmsft isabelmsft merged commit 43915ed into sonic-net:master Oct 30, 2020
kazinator-arista pushed a commit to kazinator-arista/sonic-mgmt that referenced this pull request Mar 4, 2026
…#12292)

linkmgrd:
* a5ac7f6 2022-10-05 | [Active-Active] Post link prober stats to state db  (sonic-net#140) (HEAD -> 202205, github/202205) [Jing Zhang]
* f4b0e53 2022-10-05 | [Active-Active] Retry config mux mode standby (sonic-net#139) [Jing Zhang]

utilities:
* a255838 2022-10-04 | [minigraph] new workflow for golden path (sonic-net#2396) (HEAD -> 202205, github/202205) [jingwenxie]
* 99425a8 2022-10-03 | [actions] Support Semgrep by Github Actions (sonic-net#2417) [Mai Bui]
* f41e4d1 2022-09-30 | Fix for show vxlan tunnel command display issue sonic-net#11902 (sonic-net#2391) [Senthil Bhava]
* e1d827e 2022-09-29 | [VxLAN]Fix Vxlan delete command to throw error when there are references (sonic-net#2404) [Sudharsan Dhamal Gopalarathnam]
* d77acf8 2022-09-28 | [doc] add documentation on automatic techsupport based on memory (sonic-net#2411) [Stepan Blyshchak]
* 2cfc75a 2022-09-28 | [doc] update "config feature" section with "--block" option (sonic-net#2409) [Stepan Blyshchak]
* 9dc8471 2022-09-28 | [Vxlanmgrd] [CPA] Update the vxlan_tunnel name len to be under IFNAMIZ to overcome netdev creation failure (sonic-net#2398) [Vivek]
* 342589e 2022-10-03 | Added cisco config platform commands (sonic-net#2242) (sonic-net#2418) [yucgu]

swss:
* 9d9f395 2022-10-04 | [intfmgr]: Enable `accept_untracked_na` kernel param (sonic-net#2436) (HEAD -> 202205, github/202205) [Lawrence Lee]
* 6b6d25d 2022-10-04 |  [orchdaemon]: Fixed sairedis record file rotation (sonic-net#2480) [Bryan Crossland]

Signed-off-by: Ying Xie <ying.xie@microsoft.com>

Signed-off-by: Ying Xie <ying.xie@microsoft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants