Giter Site home page Giter Site logo

deploy-k8s-local-nsx's Introduction

# deploy-k8s-local
Deploys Kubernetes cluster from scratch with NSX for overlay and LB

Requirements:
vcenter
powercli
ubuntu template
nsx-t 2.3.0 installed, ip pools configured, k8s tags all applied to infra components

The kube conf file will be copied to the current directory named as the clustername.conf

Usage
```
.\k8-lc.ps1 -username <guest username> (-password <guest password> will prompt if not specifed) -nodes <number of nodes to add or remove> -clusterName <cluster-name> -clonefrom <template vm> -portGroup <portgroup to connect to> -nsxNetwork <nsx portgroup for pods. -nsxUsername <nsx maanger username> -nsxSecurePassword <nsx manager password> (-server <vcenter if not connected>) (-remove $true <removes nodes>) (-master $true <removes master and cluster>)
```
  
examples

1) Build a 3 node culster on an already connected vcenter (connect-viserver vcenter) from a template vm ubuntu-18.0.4-lts with a user k8admin already created on the network "VM Network"
```
.\k8-lc.ps1 -username k8admin -nodes 3 -clusterName Test-Cluster -clonefrom ubuntu-18.0.4-lts -portGroup "VM Network" -nsxNetwork "Pod Network" -nsxUsername admin -nsxSecurePassword VMware1!
```
2) Scale existing cluster Test-Cluster up by 3 nodes
```
.\k8-lc.ps1 -username k8admin -nodes 2 -clusterName Test-Cluster -clonefrom ubuntu-18.0.4-lts -portGroup "VM Network" -nsxNetwork "Pod Network" -nsxUsername admin -nsxSecurePassword VMware1!
```
3) Scale existing cluster Test-Cluster down by 2 nodes
```
.\k8-lc.ps1 -username k8admin -nodes 2 -clusterName Test-Cluster -clonefrom ubuntu-18.0.4-lts -portGroup "VM Network" -remove $true -nsxNetwork "Pod Network" -nsxUsername admin -nsxSecurePassword VMware1!
```
4) Delete cluster Test-Cluster
```
.\k8-lc.ps1 -username k8admin -nodes 3 -clusterName Test-Cluster -clonefrom ubuntu-18.0.4-lts -portGroup "VM Network" -remove $true -master $true -nsxNetwork "Pod Network" -nsxUsername admin -nsxSecurePassword VMware1!
```
#########################################################
#Copyright © 2019 VMware, Inc. All Rights Reserved.
#SPDX-License-Identifier: GPL-3.0-or-later
#########################################################

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.