Closed5
netbox 3.4.4 on Kubernetes
- 以下で netbox を構築したが時間が経ったので新しいバージョンの netbox を構築してみる。
環境情報
- Kubernetes:v1.24.5
※kubeadmで構築 - helm:v3.10.3
- Ingress Controller:nginx-ingress controller
- netbox:v3.4.4
helm-repo登録
$ helm repo add bootc https://charts.boo.tc
"bootc" has been added to your repositories
$ helm repo update
Hang tight while we grab the latest from your chart repositories...
...Successfully got an update from the "bootc" chart repository
Update Complete. ?Happy Helming!?
values.yamlを取得して編集
$ helm pull bootc/netbox --untar
$ cd netbox
$ vim values.yaml
- 利用コンテナイメージと ingress の設定を編集
values.yaml
@@ -8,7 +8,7 @@
repository: netboxcommunity/netbox
pullPolicy: IfNotPresent
# Overrides the image tag whose default is the chart appVersion.
- tag: ""
+ tag: "v3.4.4"
# You can also use an existing secret for the superuser password and API token
# See `existingSecret` for details
@@ -540,13 +540,13 @@
# - 10.0.0.0/8
ingress:
- enabled: false
- className: ""
+ enabled: true
+ className: "nginx"
annotations: {}
# kubernetes.io/ingress.class: nginx
# kubernetes.io/tls-acme: "true"
hosts:
- - host: chart-example.local
+ - host: netbox.192-168-10-51.nip.io
paths:
# You can manually specify the service name and service port if
# required. This could be useful if for exemple you are using the AWS
netboxデプロイ
$ kc create ns netbox2023
namespace/netbox2023 created
$ helm install netbox bootc/netbox -n netbox2023 -f values.yaml
NAME: netbox
LAST DEPLOYED: Thu Feb 16 18:01:47 2023
NAMESPACE: netbox2023
STATUS: deployed
REVISION: 1
NOTES:
NetBox should be available at the following URL(s) shortly:
http://netbox.192-168-10-51.nip.io/
$ kubectl get all
NAME READY STATUS RESTARTS AGE
pod/netbox-6968449995-9r4h2 1/1 Running 0 2m40s
pod/netbox-postgresql-0 1/1 Running 0 2m40s
pod/netbox-redis-master-0 1/1 Running 0 2m40s
pod/netbox-redis-replicas-0 1/1 Running 0 2m40s
pod/netbox-redis-replicas-1 1/1 Running 0 114s
pod/netbox-redis-replicas-2 1/1 Running 0 77s
pod/netbox-worker-579b5c4bf7-j72d8 1/1 Running 2 (2m14s ago) 2m40s
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
service/netbox ClusterIP 10.108.90.167 <none> 80/TCP 2m40s
service/netbox-postgresql ClusterIP 10.106.192.130 <none> 5432/TCP 2m40s
service/netbox-postgresql-headless ClusterIP None <none> 5432/TCP 2m40s
service/netbox-redis-headless ClusterIP None <none> 6379/TCP 2m40s
service/netbox-redis-master ClusterIP 10.105.71.127 <none> 6379/TCP 2m40s
service/netbox-redis-replicas ClusterIP 10.104.101.188 <none> 6379/TCP 2m40s
NAME READY UP-TO-DATE AVAILABLE AGE
deployment.apps/netbox 1/1 1 1 2m40s
deployment.apps/netbox-worker 1/1 1 1 2m40s
NAME DESIRED CURRENT READY AGE
replicaset.apps/netbox-6968449995 1 1 1 2m40s
replicaset.apps/netbox-worker-579b5c4bf7 1 1 1 2m40s
NAME READY AGE
statefulset.apps/netbox-postgresql 1/1 2m40s
statefulset.apps/netbox-redis-master 1/1 2m40s
statefulset.apps/netbox-redis-replicas 3/3 2m40s
NAME SCHEDULE SUSPEND ACTIVE LAST SCHEDULE AGE
cronjob.batch/netbox-housekeeping 0 0 * * * False 0 <none> 2m40s
$ kubectl get pvc
NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS AGE
data-netbox-postgresql-0 Bound pvc-bf0bba9b-ab2e-4775-aae3-0189d05f27b4 8Gi RWO rook-ceph-block 3m2s
netbox-media Bound pvc-4b2e8ad1-ba6d-41ba-bf2a-ca316c64466d 1Gi RWO rook-ceph-block 3m2s
redis-data-netbox-redis-master-0 Bound pvc-1a858b45-9391-40be-9b25-f00aa23f6cb6 8Gi RWO rook-ceph-block 3m2s
redis-data-netbox-redis-replicas-0 Bound pvc-5ec63db9-a7c5-4850-98e2-1d30a9e2345b 8Gi RWO rook-ceph-block 3m2s
redis-data-netbox-redis-replicas-1 Bound pvc-5265b992-ee2f-4e64-89f0-6a774e1cc5ab 8Gi RWO rook-ceph-block 2m16s
redis-data-netbox-redis-replicas-2 Bound pvc-4452c2b2-18c6-446b-aa8c-73e052d0fe3d 8Gi RWO rook-ceph-block 99s
$ kubectl get ing
NAME CLASS HOSTS ADDRESS PORTS AGE
netbox nginx netbox.192-168-10-51.nip.io 10.106.174.233 80 3m4s
- ingress で指定した URL でアクセスできました。
- デフォルトのユーザー/パスワードは admin/admin
このスクラップは2023/12/21にクローズされました