Skip to content

Instantly share code, notes, and snippets.

Working on VMware Tanzu Kubernetes Grid

Jesse Hu jessehu

Working on VMware Tanzu Kubernetes Grid
  • Beijing, China
View GitHub Profile
jessehu /
Last active Oct 16, 2021
Install RabbitMQ Helm Chart
# Homepage:
# Note: Specify `--set clustering.enabled=false` in Minikube with a single k8s node.
helm repo add bitnami
helm install -n rabbitmq-system --create-namespace rabbitmq bitnami/rabbitmq \
--set clustering.enabled=false \
--set auth.username=user --set auth.password=pass \
--set persistence.size=1Gi \
jessehu / 01_additional_ca_certs.yaml
Last active Jul 30, 2021
View 01_additional_ca_certs.yaml
#@ load("@ytt:overlay", "overlay")
#@ load("@ytt:data", "data")
#! This ytt overlay adds additional custom CA certificates on TKG cluster nodes, so containerd and other tools trust these CA certificates.
#! It works when using Photon or Ubuntu as the TKG node template on all TKG infrastructure providers.
#! Trust your custom CA certificates on all Control Plane nodes.
#@overlay/match by=overlay.subset({"kind":"KubeadmControlPlane"})
jessehu / gist:903cf39200c1db965f1b0c28e60f9efb
Created Jul 9, 2019
Helm Tiller RBAC setup for K8s v1.6+
View gist:903cf39200c1db965f1b0c28e60f9efb
Helm RBAC setup for K8s v1.6+
kubectl -n kube-system create sa tiller
kubectl create clusterrolebinding tiller --clusterrole cluster-admin --serviceaccount=kube-system:tiller
helm init --service-account tiller
Error: configmaps is forbidden: User "system:serviceaccount:kube-system:default" cannot list resource "configmaps" in API group "" in the namespace "kube-system"
jessehu / gist:2e28b2d8ab454e67712cd943a8500512
Created Oct 26, 2016
List linked mode vCenter Servers 6.0 or other Service Endpoints from PSC
View gist:2e28b2d8ab454e67712cd943a8500512
from pyVim import connect
import requests
import sys, ssl
from xml.etree.ElementTree import XML, fromstring, tostring
from requests.packages.urllib3.exceptions import InsecureRequestWarning

Commit Message Guidelines

Short (72 chars or less) summary

More detailed explanatory text. Wrap it to 72 characters. The blank
line separating the summary from the body is critical (unless you omit
the body entirely).

Write your commit message in the imperative: "Fix bug" and not "Fixed
bug" or "Fixes bug." This convention matches up with commit messages
View gist:c580b58a259d1fb205ea82713b0169d1
Open a console session of the VCSA
Login as: root
Default password is: vmware
Execute the following command: /opt/vmware/share/vami/vami_config_net
After executing the command, a menu is displayed. Within the menu It is possible to change the IP address, hostname, DNS, Default gateway and proxy server.
Execute 'reboot'
jessehu / gist:8997c4e8f781d726d4583cd98e93b298
Created Mar 6, 2018
Curl for getting docker image tags
View gist:8997c4e8f781d726d4583cd98e93b298
# 'username:password' is required for non-public image repo
curl -s
jessehu / gist:90f7c00efe8fd8c5bf74d304faa62a7c
Created Jun 29, 2017
Basic of Using VMware vRealize Automation
View gist:90f7c00efe8fd8c5bf74d304faa62a7c
Here is the process for using vRA to deploy a sample OpenStack VM:
Login as admin (I use configadmin), go to 基础架构(Infrastructure)
create an OpenStack End Point for OpenStack Kilo
create fabric group (架构组), select the discovery OpenStack Region as 'Compute resources'
Go to 管理 -> 用户和组 -> 业务组
jessehu / runknife.rb
Created Feb 21, 2013
a ruby script for calling Ironfan's cluster class.
View runknife.rb
#!/usr/bin/env ruby
require 'chef'
require 'chef/knife'
require 'ironfan'
require 'chef/knife/cluster_bootstrap.rb'
knife =
jessehu / gist:deacfae0996b7c13673f
Created Jul 7, 2014
Disable unneccessary ohai plugins to compact the chef node size so as to speed up chef get/search API calls
View gist:deacfae0996b7c13673f
In Ohai 7, the ohai plugin name is not the plugin file name, but defined in the plugin file. Here is what I used in Ohai 7.0.4 :
Ohai::Config[:disabled_plugins] = [:Azure, :Filesystem, :Cloudv2, :Virtualization, :Virtualizationinfo, :Dmi, :Zpools, :Blockdevice, :Lsb, :Nodejs, :Languages, :Php, :Lua, :Perl, :C, :Java, :Python, :Erlang, :Groovy, :Ruby, :Mono, :Os, :Openstack, :Cloud, :Rackspace, :Ps, :Command, :Initpackage, :Rootgroup, :Keys, :Sshhostkey, :Ohai, :Chef, :Ohaitime, :Passwd, :Gce, :Systemprofile, :Linode, :Ipscopes, :Eucalyptus, :Ec2]