Kubernetes指南
Linux性能优化实战eBPF 核心技术与实战SDN指南个人博客
EN
EN
  • Overview
  • Introduction
    • Kubernetes Introduction
    • Kubernetes Concepts
    • Kubernetes 101
    • Kubernetes 201
    • Kubernetes Cluster
  • Concepts
    • Concepts
    • Architecture
    • Design Principles
    • Components
      • etcd
      • kube-apiserver
      • kube-scheduler
      • kube-controller-manager
      • kubelet
      • kube-proxy
      • kube-dns
      • Federation
      • kubeadm
      • hyperkube
      • kubectl
    • Objects
      • Autoscaling
      • ConfigMap
      • CronJob
      • CustomResourceDefinition
      • DaemonSet
      • Deployment
      • Ingress
      • Job
      • LocalVolume
      • Namespace
      • NetworkPolicy
      • Node
      • PersistentVolume
      • Pod
      • PodPreset
      • ReplicaSet
      • Resource Quota
      • Secret
      • SecurityContext
      • Service
      • ServiceAccount
      • StatefulSet
      • Volume
  • Setup
    • Setup Guidance
    • kubectl Install
    • Single Machine
    • Feature Gates
    • Best Practice
    • Version Support
    • Setup Cluster
      • kubeadm
      • kops
      • Kubespray
      • Azure
      • Windows
      • LinuxKit
      • kubeasz
    • Setup Addons
      • Addon-manager
      • DNS
      • Dashboard
      • Monitoring
      • Logging
      • Metrics
      • GPU
      • Cluster Autoscaler
      • ip-masq-agent
  • Extension
    • API Extension
      • Aggregation
      • CustomResourceDefinition
    • Access Control
      • Authentication
      • RBAC Authz
      • Admission
    • Scheduler Extension
    • Network Plugin
      • CNI
      • Flannel
      • Calico
      • Weave
      • Cilium
      • OVN
      • Contiv
      • SR-IOV
      • Romana
      • OpenContrail
      • Kuryr
    • Container Runtime
      • CRI-tools
      • Frakti
    • Storage Driver
      • CSI
      • FlexVolume
      • glusterfs
    • Network Policy
    • Ingress Controller
      • Ingress + Letsencrypt
      • minikube Ingress
      • Traefik Ingress
      • Keepalived-VIP
    • Cloud Provider
    • Device Plugin
  • Cloud Native Apps
    • Apps Management
      • Patterns
      • Rolling Update
      • Helm
      • Operator
      • Service Mesh
      • Linkerd
      • Linkerd2
    • Istio
      • Deploy
      • Traffic Management
      • Security
      • Policy
      • Metrics
      • Troubleshooting
      • Community
    • Devops
      • Draft
      • Jenkins X
      • Spinnaker
      • Kompose
      • Skaffold
      • Argo
      • Flux GitOps
  • Practices
    • Overview
    • Resource Management
    • Cluster HA
    • Workload HA
    • Debugging
    • Portmap
    • Portforward
    • User Management
    • GPU
    • HugePage
    • Security
    • Audit
    • Backup
    • Cert Rotation
    • Large Cluster
    • Big Data
      • Spark
      • Tensorflow
    • Serverless
  • Troubleshooting
    • Overview
    • Cluster Troubleshooting
    • Pod Troubleshooting
    • Network Troubleshooting
    • PV Troubleshooting
      • AzureDisk
      • AzureFile
    • Windows Troubleshooting
    • Cloud Platform Troubleshooting
      • Azure
    • Troubleshooting Tools
  • Community
    • Development Guide
    • Unit Test and Integration Test
    • Community Contribution
  • Appendix
    • Ecosystem
    • Learning Resources
    • Domestic Mirrors
    • How to Contribute
    • Reference Documents
由 GitBook 提供支持
在本页
  • Setting Up
  • Installing the jx Command Line Tool
  • Deploying Your Kubernetes Cluster
  • Launching Your Jenkins X Service
  • App Creation
  • Publishing Apps
  • Usual Commands
  1. Cloud Native Apps
  2. Devops

Jenkins X

上一页Draft下一页Spinnaker

最后更新于1年前

, sprinkled with the magic of Jenkins and Kubernetes, serves as an effective platform for CI/CD (Continuous Integration and Continuous Delivery) in the realm of cloud-native applications in a microservices structure. It introduces Jenkins, Helm, Draft, GitOps, Github, and similar power tools as components of an infrastructure that offers end-to-end support, right from cluster installation and environment management to continuous integration, deployment, and application publishing.

Setting Up

Installing the jx Command Line Tool

# MacOS
brew tap jenkins-x/jx
brew install jx

# Linux
curl -L https://github.com/jenkins-x/jx/releases/download/v1.1.10/jx-linux-amd64.tar.gz | tar xzv
sudo mv jx /usr/local/bin

Deploying Your Kubernetes Cluster

You can skip this step if you already have a deployed Kubernetes cluster.

With the jx command, you can thrust your Kubernetes directly into the cloud:

create cluster aks      # Create a new kubernetes cluster on AKS: Runs on Azure
create cluster aws      # Create a new kubernetes cluster on AWS with kops
create cluster gke      # Create a new kubernetes cluster on GKE: Runs on Google Cloud
create cluster minikube # Create a new kubernetes cluster with minikube: Runs locally

Launching Your Jenkins X Service

Before you introduce Jenkins X service into the mix, make sure that RBAC is activated in your Kubernetes cluster and insecure docker registries are on (dockerd --insecure-registry=10.0.0.0/16).

Execute the following command and follow the instructions to configure:

  • An Ingress Controller (if not installed)

  • Public IP's DNS of Ingress (with ip.xip.io as the default)

  • Github API token (for conjuring github repos and webhooks)

  • The Jenkins-X service

  • Demonstration projects such as 'staging' and 'production', including github repo and Jenkins configuration, etc.

jx install --provider=kubernetes

When the installation wraps up, you'll get Jenkins's access point as well as the admin username and password to log into Jenkins.

App Creation

Jenkins X takes you on a speedy ride to create new applications:

# To create a Spring Boot application
jx create spring -d web -d actuator

# For a quick start project creation
jx create quickstart  -l go

It also offers successful app imports, as long as:

  • Github or equivalent git systems manage their source code and have Jenkins webhooks in place.

  • Dockerfile, Jenkinsfile, and any required Helm Charts to run the app are added.

# Import from local
$ cd my-cool-app
$ jx import

# Import from Github
jx import --github --org myname

# Import from URL
jx import --url https://github.com/jenkins-x/spring-boot-web-example.git

Publishing Apps

# To launch a recent version into the production environment
jx promote myapp --version 1.2.3 --env production

Usual Commands

# Get pipelines
jx get pipelines

# Get pipeline activities
jx get activities

# Get build logs
jx get build logs -f myapp

# Open Jenkins in the browser
jx console

# Get applications
jx get applications

# Get environments
jx get environments
Jenkins X